Skip to content

Commit

Permalink
Update ESLint to v9 (#470)
Browse files Browse the repository at this point in the history
* Update ESLint to v9

Kept the old config for now

* Switch to flat config
  • Loading branch information
XhmikosR committed May 6, 2024
1 parent 6062976 commit fbaa9dd
Show file tree
Hide file tree
Showing 4 changed files with 144 additions and 177 deletions.
36 changes: 0 additions & 36 deletions .eslintrc.json

This file was deleted.

58 changes: 58 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
import js from '@eslint/js'
import globals from 'globals'

/** @type {import('eslint').Linter.FlatConfig[]} */
export default [
// global ignores
{
ignores: [
'.cache/**',
'.netlify/**',
'_site/**',
'node_modules/**',
'resources/**'
],
},
{
languageOptions: {
ecmaVersion: 2019,
sourceType: 'module',
globals: {
...globals.browser
}
},
linterOptions: {
reportUnusedDisableDirectives: 'error'
}
},
js.configs.recommended,
{
files: [
'**/*.js',
'**/*.mjs'
],
rules: {
'no-return-await': 'error',
'object-curly-spacing': [
'error',
'always'
],
'prefer-template': 'error',
semi: [
'error',
'never'
],
strict: 'error'
}
},
{
files: [
'scripts/**'
],
languageOptions: {
globals: {
...globals.nodeBuiltin
}
}
}
]

0 comments on commit fbaa9dd

Please sign in to comment.