Skip to content

Commit 9b97051

Browse files
committed
fix: merge linter packages and update config
2 parents 39fc611 + 52a2fa4 commit 9b97051

5 files changed

Lines changed: 4065 additions & 1956 deletions

File tree

.eslintignore

Lines changed: 0 additions & 7 deletions
This file was deleted.

eslint.config.mjs

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
import js from '@eslint/js'
2+
import importPlugin from 'eslint-plugin-import'
3+
import prettierPlugin from 'eslint-plugin-prettier'
4+
import prettierConfig from 'eslint-config-prettier'
5+
import chaiFriendly from 'eslint-plugin-chai-friendly'
6+
7+
export default [
8+
js.configs.recommended,
9+
{
10+
files: ['**/*.js'],
11+
plugins: {
12+
import: importPlugin,
13+
prettier: prettierPlugin,
14+
'chai-friendly': chaiFriendly,
15+
},
16+
languageOptions: {
17+
ecmaVersion: 9,
18+
sourceType: 'module',
19+
globals: {
20+
// Node.js globals
21+
process: 'readonly',
22+
__dirname: 'readonly',
23+
__filename: 'readonly',
24+
require: 'readonly',
25+
module: 'readonly',
26+
exports: 'writable',
27+
console: 'readonly',
28+
Buffer: 'readonly',
29+
30+
// Mocha globals
31+
describe: 'readonly',
32+
it: 'readonly',
33+
before: 'readonly',
34+
after: 'readonly',
35+
beforeEach: 'readonly',
36+
afterEach: 'readonly',
37+
},
38+
},
39+
settings: {
40+
'import/resolver': {
41+
node: {
42+
extensions: ['.js'],
43+
},
44+
},
45+
},
46+
rules: {
47+
...prettierConfig.rules,
48+
'import/no-extraneous-dependencies': 'off',
49+
'eol-last': ['error', 'always'],
50+
'import/extensions': 'off',
51+
'no-shadow': 0,
52+
'no-unused-vars': 0,
53+
'prefer-destructuring': 0,
54+
},
55+
},
56+
{
57+
ignores: [
58+
'node_modules/',
59+
'coverage/',
60+
'dist/',
61+
'.history/',
62+
'.vscode/',
63+
],
64+
},
65+
]

0 commit comments

Comments
 (0)