Skip to content

Commit

Permalink
refactor: update eslint to 9
Browse files Browse the repository at this point in the history
  • Loading branch information
derikb committed Jun 2, 2024
1 parent 032b5c1 commit 134b26f
Show file tree
Hide file tree
Showing 9 changed files with 796 additions and 2,226 deletions.
39 changes: 0 additions & 39 deletions .eslintrc.json

This file was deleted.

12 changes: 12 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"eslint.experimental.useFlatConfig": true,
"cSpell.ignorePaths": [
"package-lock.json",
"node_modules",
"vscode-extension",
".git/objects",
".vscode",
".vscode-insiders",
"**/*.js"
]
}
40 changes: 40 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import js from '@eslint/js';
import globals from 'globals';
import stylisticJs from '@stylistic/eslint-plugin-js';

export default [
js.configs.recommended,
{
languageOptions: {
globals: {
...globals.browser
}
},
plugins: {
'@stylistic/js': stylisticJs
},
rules: {
'@stylistic/js/indent': [
'error',
4,
{ SwitchCase: 1 }
],
'@stylistic/js/linebreak-style': [
'error',
'unix'
],
'@stylistic/js/quotes': [
'error',
'single',
{ allowTemplateLiterals: true }
],
'@stylistic/js/semi': [
'error',
'always'
],
'@stylistic/js/no-trailing-spaces': ['error', { skipBlankLines: true }],
camelcase: ['off'],
'prefer-const': ['error'],
}
}
];
Loading

0 comments on commit 134b26f

Please sign in to comment.