Skip to content

Commit

Permalink
Update ESLint to v9.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR committed May 15, 2024
1 parent 96833da commit dd9f52b
Show file tree
Hide file tree
Showing 5 changed files with 149 additions and 167 deletions.
4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

34 changes: 0 additions & 34 deletions .eslintrc.json

This file was deleted.

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

/** @type {import('eslint').Linter.FlatConfig[]} */
export default [
// global ignores
{
ignores: [
'**/*.min.js',
'**/dist/**',
'**/vendor/**',
'_site/**',
'node_modules/**',
'resources/**',
'**/.fantasticonrc.js'
],
},
{
languageOptions: {
ecmaVersion: 2020,
sourceType: 'module',
globals: {
...globals.nodeBuiltin
}
},
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: [
'docs/assets/js/**'
],
languageOptions: {
globals: {
...globals.browser
}
}
}
]
Loading

0 comments on commit dd9f52b

Please sign in to comment.