Skip to content

Commit

Permalink
added new eslint config file
Browse files Browse the repository at this point in the history
  • Loading branch information
Sickbart committed Jun 2, 2024
1 parent 5e95f05 commit 0ee2f37
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions eslint.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
const html = require('eslint-plugin-html');
const globals = require('globals');
const js = require('@eslint/js');

const {
FlatCompat,
} = require('@eslint/eslintrc');

const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

module.exports = [...compat.extends('eslint:recommended'), {
plugins: {
html,
},

languageOptions: {
globals: {
...globals.node,
...globals.mocha,
...globals.jquery,
},

ecmaVersion: 2018,
sourceType: 'commonjs',
},

rules: {
indent: ['error', 'tab', {
SwitchCase: 1,
}],

'no-console': 'off',
'no-var': 'error',
'no-trailing-spaces': 'error',
'prefer-const': 'error',

quotes: ['error', 'single', {
avoidEscape: true,
allowTemplateLiterals: true,
}],

semi: ['error', 'always'],
},
}];

0 comments on commit 0ee2f37

Please sign in to comment.