forked from code-golf/code-golf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
34 lines (32 loc) · 1.62 KB
/
eslint.config.js
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
30
31
32
33
34
import tsParser from '@typescript-eslint/parser';
import tsPlugin from '@typescript-eslint/eslint-plugin';
// Debug which files are matched with:
// DEBUG=eslint:linter node_modules/.bin/eslint js 2>&1 | grep 'Linting code'
export default [
{ ignores: ['js/vendor/**'] }, // Globally ignore vendored code.
{
files: ['js/**/*.ts', 'js/**/*.tsx'],
languageOptions: { parser: tsParser },
plugins: { '@typescript-eslint': tsPlugin },
rules: {
'array-bracket-newline': ['error', 'consistent'],
'arrow-parens': ['error', 'as-needed'],
'brace-style': ['error', 'stroustrup'],
'camelcase': ['error'],
'comma-dangle': ['error', 'always-multiline'],
'indent': ['error'],
'keyword-spacing': ['error'],
'no-duplicate-imports': ['error'],
'no-trailing-spaces': ['error'],
'no-unused-vars': ['error'],
'no-useless-assignment': ['error'],
'no-var': ['error'],
'prefer-const': ['error'],
'prefer-destructuring': ['error', { object: true }],
'quote-props': ['error', 'consistent-as-needed'],
'quotes': ['error', 'single', { avoidEscape: true }],
'semi': ['error', 'always'],
'space-before-function-paren': ['error', { named: 'never' }],
},
},
];