Skip to content

Commit

Permalink
ESLint 9.x
Browse files Browse the repository at this point in the history
  • Loading branch information
klein0r committed Jun 27, 2024
1 parent c7df1fc commit c2fbdcd
Show file tree
Hide file tree
Showing 5 changed files with 224 additions and 63 deletions.
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

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

This file was deleted.

40 changes: 40 additions & 0 deletions eslint.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
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 = [
{
ignores: ['.dev-server/**', '**/.eslintrc.js'],
},
...compat.extends('eslint:recommended', 'plugin:prettier/recommended'),
{
languageOptions: {
globals: {
...globals.node,
...globals.mocha,
},

ecmaVersion: 2022,
sourceType: 'commonjs',

parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
},

rules: {
'no-console': 'off',
'no-var': 'error',
'prefer-const': 'error',
},
},
];
Loading

0 comments on commit c2fbdcd

Please sign in to comment.