mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-06-15 17:19:10 +00:00
chore: tslint to eslint
This commit is contained in:
parent
97c09f4aa5
commit
a33aa3841c
29 changed files with 681 additions and 173 deletions
127
.eslintrc.js
Normal file
127
.eslintrc.js
Normal file
|
@ -0,0 +1,127 @@
|
|||
module.exports = {
|
||||
env: {
|
||||
browser: true,
|
||||
es6: true,
|
||||
node: true,
|
||||
},
|
||||
extends: ['prettier', 'prettier/@typescript-eslint'],
|
||||
parser: '@typescript-eslint/parser',
|
||||
parserOptions: {
|
||||
project: 'tsconfig.json',
|
||||
sourceType: 'module',
|
||||
},
|
||||
plugins: [
|
||||
'eslint-plugin-import',
|
||||
'eslint-plugin-jsdoc',
|
||||
'eslint-plugin-react',
|
||||
'@typescript-eslint',
|
||||
'@typescript-eslint/tslint',
|
||||
],
|
||||
rules: {
|
||||
'@typescript-eslint/await-thenable': 'error',
|
||||
'@typescript-eslint/consistent-type-assertions': 'error',
|
||||
'@typescript-eslint/indent': 'off',
|
||||
'@typescript-eslint/member-delimiter-style': [
|
||||
'off',
|
||||
{
|
||||
multiline: {
|
||||
delimiter: 'none',
|
||||
requireLast: true,
|
||||
},
|
||||
singleline: {
|
||||
delimiter: 'semi',
|
||||
requireLast: false,
|
||||
},
|
||||
},
|
||||
],
|
||||
'@typescript-eslint/naming-convention': 'error',
|
||||
'@typescript-eslint/no-empty-function': 'error',
|
||||
'@typescript-eslint/no-floating-promises': 'error',
|
||||
'@typescript-eslint/no-misused-new': 'error',
|
||||
'@typescript-eslint/no-unnecessary-qualifier': 'error',
|
||||
'@typescript-eslint/no-unnecessary-type-assertion': 'error',
|
||||
'@typescript-eslint/no-unused-expressions': [
|
||||
'error',
|
||||
{
|
||||
allowTaggedTemplates: true,
|
||||
allowShortCircuit: true,
|
||||
},
|
||||
],
|
||||
'@typescript-eslint/prefer-namespace-keyword': 'error',
|
||||
'@typescript-eslint/quotes': 'off',
|
||||
'@typescript-eslint/semi': ['off', null],
|
||||
'@typescript-eslint/triple-slash-reference': [
|
||||
'error',
|
||||
{
|
||||
path: 'always',
|
||||
types: 'prefer-import',
|
||||
lib: 'always',
|
||||
},
|
||||
],
|
||||
'@typescript-eslint/type-annotation-spacing': 'off',
|
||||
'@typescript-eslint/unified-signatures': 'error',
|
||||
'arrow-parens': ['off', 'always'],
|
||||
'brace-style': ['off', 'off'],
|
||||
'comma-dangle': 'off',
|
||||
curly: ['error', 'multi-line'],
|
||||
'eol-last': 'off',
|
||||
eqeqeq: ['error', 'smart'],
|
||||
'id-blacklist': [
|
||||
'error',
|
||||
'any',
|
||||
'Number',
|
||||
'number',
|
||||
'String',
|
||||
'string',
|
||||
'Boolean',
|
||||
'boolean',
|
||||
'Undefined',
|
||||
'undefined',
|
||||
],
|
||||
'id-match': 'error',
|
||||
'import/no-deprecated': 'error',
|
||||
'jsdoc/check-alignment': 'error',
|
||||
'jsdoc/check-indentation': 'error',
|
||||
'jsdoc/newline-after-description': 'error',
|
||||
'linebreak-style': 'off',
|
||||
'max-len': 'off',
|
||||
'new-parens': 'off',
|
||||
'newline-per-chained-call': 'off',
|
||||
'no-caller': 'error',
|
||||
'no-cond-assign': 'error',
|
||||
'no-constant-condition': 'error',
|
||||
'no-control-regex': 'error',
|
||||
'no-duplicate-imports': 'error',
|
||||
'no-empty': 'error',
|
||||
'no-eval': 'error',
|
||||
'no-extra-semi': 'off',
|
||||
'no-fallthrough': 'error',
|
||||
'no-invalid-regexp': 'error',
|
||||
'no-irregular-whitespace': 'off',
|
||||
'no-multiple-empty-lines': 'off',
|
||||
'no-redeclare': 'error',
|
||||
'no-regex-spaces': 'error',
|
||||
'no-return-await': 'error',
|
||||
'no-throw-literal': 'error',
|
||||
'no-trailing-spaces': 'off',
|
||||
'no-underscore-dangle': 'error',
|
||||
'no-unused-labels': 'error',
|
||||
'no-var': 'error',
|
||||
'one-var': ['error', 'never'],
|
||||
'quote-props': 'off',
|
||||
radix: 'error',
|
||||
'react/jsx-curly-spacing': 'off',
|
||||
'react/jsx-equals-spacing': 'off',
|
||||
'react/jsx-wrap-multilines': 'off',
|
||||
'space-before-function-paren': 'off',
|
||||
'space-in-parens': ['off', 'never'],
|
||||
'spaced-comment': [
|
||||
'error',
|
||||
'always',
|
||||
{
|
||||
markers: ['/'],
|
||||
},
|
||||
],
|
||||
'use-isnan': 'error',
|
||||
},
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue