Skip to content

Commit

Permalink
Update ESLint
Browse files Browse the repository at this point in the history
  • Loading branch information
hudochenkov committed Nov 10, 2024
1 parent 7dbb12e commit c607370
Show file tree
Hide file tree
Showing 5 changed files with 3,152 additions and 1,463 deletions.
28 changes: 0 additions & 28 deletions .eslintrc.json

This file was deleted.

32 changes: 32 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import { configs } from 'eslint-config-hudochenkov';
import eslintConfigPrettier from 'eslint-config-prettier';
import globals from 'globals';

export default [
...configs.main,
eslintConfigPrettier,
{
languageOptions: {
globals: {
...Object.fromEntries(Object.entries(globals.browser).map(([key]) => [key, 'off'])),
...globals.node,
...globals.jest,
testConfig: true,
testRule: true,
},
ecmaVersion: 'latest',
sourceType: 'module',
},
rules: {
'import/extensions': [
'error',
'always',
{
ignorePackages: true,
},
],
'unicorn/prefer-module': 'error',
'unicorn/prefer-node-protocol': 'error',
},
},
];
Loading

0 comments on commit c607370

Please sign in to comment.