DiscordTickets/.eslintrc.js

202 lines
2.9 KiB
JavaScript
Raw Normal View History

module.exports = {
'env': {
2022-03-18 14:54:33 +02:00
'browser': false,
'commonjs': false,
'es6': true,
'node': true,
},
2022-03-18 14:54:33 +02:00
'extends': ['eslint:recommended'],
'parser': '@typescript-eslint/parser',
2021-05-22 02:04:18 +03:00
'parserOptions': { 'ecmaVersion': 12 },
2022-03-18 14:54:33 +02:00
'root': true,
'rules': {
2022-03-18 14:54:33 +02:00
'@typescript-eslint/no-var-requires': ['off'],
2021-05-22 02:04:18 +03:00
'array-bracket-newline': [
'error',
'consistent'
],
'array-bracket-spacing': [
'error',
'never'
],
'array-element-newline': [
'error',
'consistent'
],
'arrow-body-style': [
'error',
'as-needed'
],
'arrow-parens': [
'error',
'as-needed'
],
'block-spacing': [
'error',
'always'
],
'brace-style': [
'error',
'1tbs'
],
'comma-dangle': [
'error',
2022-03-18 14:54:33 +02:00
{
'arrays': 'never',
'exports': 'never',
'functions': 'never',
'imports': 'never',
'objects': 'always-multiline',
}
2021-05-22 02:04:18 +03:00
],
'comma-spacing': [
'error',
{
'after': true,
2022-03-18 14:54:33 +02:00
'before': false,
2021-05-22 02:04:18 +03:00
}
],
'comma-style': [
'error',
'last'
],
'computed-property-spacing': [
'error',
'never'
],
'curly': [
'error',
'multi-line', // 'multi'
'consistent'
],
'default-case-last': [
'error'
],
'dot-location': [
'error',
'property'
],
'dot-notation': [
'error'
],
'eqeqeq': [
'error'
],
'func-call-spacing': [
'error',
'never'
],
'indent': [
2021-04-01 00:12:30 +03:00
'error',
'tab'
],
2021-04-01 00:12:30 +03:00
'linebreak-style': [
2021-05-21 22:47:22 +03:00
'off',
2021-04-01 00:12:30 +03:00
'windows'
],
2021-05-22 02:04:18 +03:00
'max-depth': [
'warn',
{ 'max': 5 }
],
'max-len': [
'warn',
{
'code': 150,
'ignoreRegExpLiterals': true,
'ignoreStrings': true,
'ignoreTemplateLiterals': true,
'ignoreTrailingComments': true,
2022-03-18 14:54:33 +02:00
'ignoreUrls': true,
2021-05-22 02:04:18 +03:00
}
],
'max-lines': [
2022-03-18 14:54:33 +02:00
'warn'
2021-05-22 02:04:18 +03:00
],
'max-statements-per-line': [
'error'
],
'multiline-comment-style': [
'warn'
],
'no-console': [
2022-03-18 14:54:33 +02:00
'off'
2021-05-22 02:04:18 +03:00
],
'no-return-assign': [
'error'
],
'no-template-curly-in-string': [
'warn'
],
'no-trailing-spaces': [
'error'
],
'no-underscore-dangle': [
2022-03-18 14:54:33 +02:00
'error', {
'allowAfterThis': true,
'allowFunctionParams': true,
}
2021-05-22 02:04:18 +03:00
],
'no-unneeded-ternary': [
'error'
],
'no-var': [
'error'
],
'no-whitespace-before-property': [
'error'
],
'object-curly-newline': [
'error',
{
'minProperties': 2,
2022-03-18 14:54:33 +02:00
'multiline': true,
2021-05-22 02:04:18 +03:00
}
],
'object-curly-spacing': [
'error',
'always'
],
'object-property-newline': [
'error'
],
'operator-linebreak': [
'error'
],
'prefer-arrow-callback': [
'error'
],
2021-05-20 21:06:42 +03:00
'prefer-const': [
'error',
{
2021-05-21 22:50:18 +03:00
'destructuring': 'all',
2022-03-18 14:54:33 +02:00
'ignoreReadBeforeAssign': false,
2021-05-20 21:06:42 +03:00
}
],
2021-04-01 00:12:30 +03:00
'quotes': [
'error',
'single'
],
'rest-spread-spacing': [
'error',
'never'
],
'semi': [
'error',
'always'
],
2021-05-22 02:04:18 +03:00
'sort-keys': [
'error',
'asc',
{ 'natural': true }
],
'space-in-parens': [
'error',
'never'
2021-05-22 02:06:48 +03:00
],
'spaced-comment': [
'error',
'always'
2022-03-18 14:54:33 +02:00
],
},
};