wesnoth/utils/wesnoth-map-diff/.eslintrc.js
2022-04-27 17:40:52 -05:00

82 lines
2.0 KiB
JavaScript

module.exports = {
parser: '@typescript-eslint/parser',
plugins: [
'@typescript-eslint',
],
overrides: [
{
files: ['**/*.ts'],
},
],
extends: [
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
],
rules: {
'@typescript-eslint/member-delimiter-style': ['error', {
multiline: {
delimiter: 'comma',
requireLast: true,
},
singleline: {
delimiter: 'comma',
requireLast: false,
},
}],
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-empty-interface': [
'error',
{
allowSingleExtends: true,
},
],
'@typescript-eslint/no-var-requires': 'off',
'arrow-parens': 'off',
'comma-dangle': [
'error',
{
arrays: 'always-multiline',
exports: 'always-multiline',
functions: 'never',
imports: 'always-multiline',
objects: 'always-multiline',
},
],
'function-paren-newline': ['error', 'consistent'],
'quote-props': ['error', 'as-needed'],
'max-len': [
'error',
{
code: 120,
ignoreComments: true,
ignoreRegExpLiterals: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
ignoreTrailingComments: true,
ignoreUrls: true,
tabWidth: 2,
},
],
'multiline-ternary': ['error', 'always-multiline'],
'no-unused-expressions': ['error', { allowTernary: true }],
'no-multiple-empty-lines': [
'error',
{
max: 1,
maxEOF: 1,
},
],
'implicit-arrow-linebreak': 'off',
'import/extensions': 'off',
'import/no-unresolved': 'off',
semi: ['error', 'never'],
'space-before-function-paren': ['error', 'always'],
'object-curly-spacing': ['error', 'always'],
'operator-linebreak': [
'error',
'before',
{ overrides: { '=': 'after', ':': 'before', '?': 'before' } },
],
},
}