Skip to content

Commit

Permalink
⚗️ [Eslint] More config experiments
Browse files Browse the repository at this point in the history
  • Loading branch information
beefchimi committed Jul 15, 2024
1 parent abf10a6 commit 7d3fe83
Show file tree
Hide file tree
Showing 3 changed files with 126 additions and 7 deletions.
22 changes: 22 additions & 0 deletions app/website/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ import {fileURLToPath} from 'node:url';
import {FlatCompat} from '@eslint/eslintrc';
import pluginVue from 'eslint-plugin-vue';

// import vueParser from 'vue-eslint-parser';
// import tsParser from '@typescript-eslint/parser';
// import tsPlugin from '@typescript-eslint/eslint-plugin';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
Expand All @@ -21,6 +25,12 @@ const compat = new FlatCompat({
// to end up with the correct parser.
export default [
{
// ignores: ['.nx/cache', 'coverage/**', 'dist/**', 'scrap/**'],

// We want the root `eslint` config to handle everything outside
// of this folder, so we will ignore everything except `/app`.
// ignores: ['**/*', '!app/**/*/'],

ignores: ['.nx/cache', 'coverage/**', 'dist/**', 'scrap/**'],
},

Expand All @@ -45,6 +55,18 @@ export default [
sourceType: 'module',
},

// Taken from:
// https://github.com/vuejs/vue-eslint-parser/issues/232
/*
languageOptions: {
parser: vueParser,
parserOptions: {
parser: tsParser,
},
ecmaVersion: 'latest',
},
*/

rules: {
'no-console': 'warn',

Expand Down
2 changes: 2 additions & 0 deletions app/website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,12 @@
"@earwurm/types": "workspace:*",
"@eslint/eslintrc": "^3.1.0",
"@tsconfig/node20": "^20.1.4",
"@typescript-eslint/parser": "^7.12.0",
"@vitejs/plugin-vue": "^5.0.4",
"@vue/eslint-config-prettier": "^9.0.0",
"@vue/eslint-config-typescript": "^13.0.0",
"@vue/tsconfig": "^0.5.1",
"vue-eslint-parser": "^9.4.3",
"eslint-plugin-vue": "^9.26.0",
"lightningcss": "^1.25.1",
"vite-plugin-svg-sprite": "^0.5.2",
Expand Down
109 changes: 102 additions & 7 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7d3fe83

Please sign in to comment.