Skip to content

Commit

Permalink
Update ESLint to v9.x (#269)
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR authored Sep 2, 2024
1 parent 55e07a0 commit bb859a8
Show file tree
Hide file tree
Showing 4 changed files with 186 additions and 235 deletions.
26 changes: 0 additions & 26 deletions .eslintrc.json

This file was deleted.

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

/** @type {import('eslint').Linter.RulesRecord} */
const RULES = {
'comma-dangle': [
'error',
'never'
],
'quotes': [
'error',
'single'
],
'quote-props': [
'error',
'always'
]
};

/** @type {import('eslint').Linter.FlatConfig[]} */
export default [
// global ignores
{
'ignores': [
'bootstrap',
'node_modules/**'
]
},
{
'languageOptions': {
'ecmaVersion': 2022,
'sourceType': 'script',
'globals': {
...globals.node
}
},
'linterOptions': {
'reportUnusedDisableDirectives': 'error'
}
},
js.configs.recommended,
{
'files': [
'**/*.js'
],
'rules': {
...RULES
}
},
{
'files': [
'**/*.mjs'
],
'languageOptions': {
'sourceType': 'module',
'globals': {
...globals.nodeBuiltin
}
},
'rules': {
...RULES
}
}
]
Loading

0 comments on commit bb859a8

Please sign in to comment.