-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.mjs
More file actions
29 lines (28 loc) · 866 Bytes
/
eslint.config.mjs
File metadata and controls
29 lines (28 loc) · 866 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import pluginJs from '@eslint/js';
import eslintConfigPrettier from 'eslint-config-prettier';
import eslintPluginUnicorn from 'eslint-plugin-unicorn';
import globals from 'globals';
import tseslint from 'typescript-eslint';
export default [
{ files: ['**/*.{cjs,js,mjs,ts}'] },
{ ignores: ['**/dist/**'] },
{ languageOptions: { globals: globals.node } },
pluginJs.configs.recommended,
...tseslint.configs.strict,
eslintPluginUnicorn.configs['flat/recommended'],
{
rules: {
'@typescript-eslint/explicit-function-return-type': 'error',
'unicorn/filename-case': ['error', { cases: { camelCase: true, pascalCase: true } }],
'unicorn/no-useless-undefined': 'off',
'unicorn/prefer-ternary': 'off',
'unicorn/prevent-abbreviations': [
'error',
{
replacements: { obj: false, tmp: false },
},
],
},
},
eslintConfigPrettier,
];