Skip to content

Commit

Permalink
chore: update to eslint flat config & bump to eslint v9
Browse files Browse the repository at this point in the history
  • Loading branch information
brunob committed Jul 2, 2024
1 parent 3817018 commit 2d1c717
Show file tree
Hide file tree
Showing 4 changed files with 450 additions and 2,417 deletions.
42 changes: 0 additions & 42 deletions .eslintrc

This file was deleted.

54 changes: 54 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
const globals = require('globals');
const html = require('eslint-plugin-html');
const stylistic = require('@stylistic/eslint-plugin-js');

module.exports = [
{
languageOptions: {
globals: {
...globals.browser,
L: true,
module: false,
define: false,
require: true,
},

ecmaVersion: 6,
sourceType: 'script',
},
plugins: {
'@stylistic/js': stylistic,
},
rules: {
camelcase: 2,
'@stylistic/js/quotes': [2, 'single', 'avoid-escape'],
'@stylistic/js/no-mixed-spaces-and-tabs': [2, 'smart-tabs'],
'@stylistic/js/space-before-function-paren': 2,
'@stylistic/js/space-in-parens': 2,
'@stylistic/js/object-curly-spacing': 2,
'@stylistic/js/array-bracket-spacing': 2,
'@stylistic/js/computed-property-spacing': 2,
'@stylistic/js/space-before-blocks': 2,
'@stylistic/js/keyword-spacing': 2,
'no-lonely-if': 2,
'@stylistic/js/comma-style': 2,
'no-underscore-dangle': 0,
'no-constant-condition': 0,
'@stylistic/js/no-multi-spaces': 0,
strict: 0,
'@stylistic/js/key-spacing': 0,
'no-shadow': 0,
'no-unused-vars': 2,
eqeqeq: 2,
},
},
{
files: ['**/*.html'],
plugins: {
html,
},
settings: {
'html/report-bad-indent': 2,
},
}
];
Loading

0 comments on commit 2d1c717

Please sign in to comment.