Skip to content

Commit

Permalink
feat(eslint-config): improve default language options
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Mar 25, 2024
1 parent 37ab534 commit f48c7d9
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion packages/eslint-config/src/flat/configs/javascript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,17 @@ import globals from 'globals'
export default function javascript(): Linter.FlatConfig[] {
return [
{
name: 'eslint:recommended',
name: 'nuxt:javascript',
languageOptions: {
ecmaVersion: 2022,
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 2022,
sourceType: 'module',
},
sourceType: 'module',
globals: {
...globals.browser,
...globals.es2021,
Expand All @@ -17,6 +26,9 @@ export default function javascript(): Linter.FlatConfig[] {
window: 'readonly',
},
},
linterOptions: {
reportUnusedDisableDirectives: true,
},
...pluginESLint.configs.recommended,
},
]
Expand Down

0 comments on commit f48c7d9

Please sign in to comment.