Skip to content

Commit ccc7553

Browse files
dependabot[bot]flakey5ovflowd
authored
chore: bump the lint group across 1 directory with 3 updates (#221)
Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: flakey5 <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: flakey5 <[email protected]> Co-authored-by: Claudio W <[email protected]>
1 parent 8bba5bb commit ccc7553

File tree

6 files changed

+344
-372
lines changed

6 files changed

+344
-372
lines changed

.eslintignore

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

.eslintrc.json

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

eslint.config.mjs

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
import globals from 'globals';
2+
import typescriptEslint from '@typescript-eslint/eslint-plugin';
3+
import tsParser from '@typescript-eslint/parser';
4+
import path from 'node:path';
5+
import { fileURLToPath } from 'node:url';
6+
import js from '@eslint/js';
7+
import { FlatCompat } from '@eslint/eslintrc';
8+
9+
const __filename = fileURLToPath(import.meta.url);
10+
const __dirname = path.dirname(__filename);
11+
12+
const compat = new FlatCompat({
13+
baseDirectory: __dirname,
14+
recommendedConfig: js.configs.recommended,
15+
allConfig: js.configs.all,
16+
});
17+
18+
export default [
19+
{ ignores: ['**/node_modules/', '**/dist/', 'src/templates/*.out.js'] },
20+
...compat.extends('eslint:recommended', 'prettier'),
21+
{
22+
languageOptions: {
23+
globals: { ...globals.node },
24+
ecmaVersion: 5,
25+
sourceType: 'module',
26+
},
27+
},
28+
{
29+
files: ['scripts/*.js'],
30+
languageOptions: { globals: { ...globals.node } },
31+
},
32+
...compat
33+
.extends(
34+
'plugin:@typescript-eslint/eslint-recommended',
35+
'plugin:@typescript-eslint/recommended'
36+
)
37+
.map(config => ({ ...config, files: ['src/**/*.ts'] })),
38+
{
39+
files: ['src/**/*.ts'],
40+
plugins: { '@typescript-eslint': typescriptEslint },
41+
languageOptions: {
42+
parser: tsParser,
43+
ecmaVersion: 5,
44+
sourceType: 'module',
45+
parserOptions: { project: './tsconfig.json' },
46+
},
47+
rules: {
48+
'no-unused-vars': 'off',
49+
'@typescript-eslint/strict-boolean-expressions': 'error',
50+
'@typescript-eslint/no-unused-vars': [
51+
'error',
52+
{
53+
argsIgnorePattern: '^_',
54+
varsIgnorePattern: '^_',
55+
caughtErrorsIgnorePattern: '^_',
56+
ignoreRestSiblings: true,
57+
},
58+
],
59+
'@typescript-eslint/explicit-function-return-type': 'error',
60+
'@typescript-eslint/consistent-type-imports': 'error',
61+
},
62+
},
63+
];

0 commit comments

Comments
 (0)