Skip to content

Commit f48c7d9

Browse files
committed
feat(eslint-config): improve default language options
1 parent 37ab534 commit f48c7d9

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

packages/eslint-config/src/flat/configs/javascript.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,17 @@ import globals from 'globals'
66
export default function javascript(): Linter.FlatConfig[] {
77
return [
88
{
9-
name: 'eslint:recommended',
9+
name: 'nuxt:javascript',
1010
languageOptions: {
11+
ecmaVersion: 2022,
12+
parserOptions: {
13+
ecmaFeatures: {
14+
jsx: true,
15+
},
16+
ecmaVersion: 2022,
17+
sourceType: 'module',
18+
},
19+
sourceType: 'module',
1120
globals: {
1221
...globals.browser,
1322
...globals.es2021,
@@ -17,6 +26,9 @@ export default function javascript(): Linter.FlatConfig[] {
1726
window: 'readonly',
1827
},
1928
},
29+
linterOptions: {
30+
reportUnusedDisableDirectives: true,
31+
},
2032
...pluginESLint.configs.recommended,
2133
},
2234
]

0 commit comments

Comments
 (0)