@aptpod/data-viz-create-visual-parts-react
Version:
template of npm project with typescript
61 lines (57 loc) • 2.08 kB
JavaScript
module.exports = {
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
extends: [
'prettier/@typescript-eslint',
'plugin:import/typescript',
'plugin:@typescript-eslint/recommended',
// 'plugin:@typescript-eslint/recommended-requiring-type-checking',
],
parserOptions: {
loggerFn: false,
warnOnUnsupportedTypeScriptVersion: false,
sourceType: 'module',
jsx: true,
project: './tsconfig.json',
createDefaultProgram: true,
},
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
},
rules: {
'no-dupe-class-members': 'off',
'no-unused-vars': 'off',
'no-array-constructor': 'off',
'no-unused-expressions': 'off',
'import/order': 'error',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/no-array-constructor': 'error',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-extra-semi': 'off',
'@typescript-eslint/no-inferrable-types': 'off',
'@typescript-eslint/no-unnecessary-type-assertion': 'error',
'@typescript-eslint/no-unused-vars': ['error', { args: 'none' }],
'@typescript-eslint/no-useless-constructor': 'error',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/prefer-for-of': 'warn',
'@typescript-eslint/prefer-includes': 'error',
'@typescript-eslint/prefer-interface': 'off',
'@typescript-eslint/prefer-optional-chain': 'off',
'@typescript-eslint/prefer-string-starts-ends-with': 'error',
'@typescript-eslint/require-array-sort-compare': 'error',
// https://github.com/typescript-eslint/typescript-eslint/issues/131
'no-undef': 'off',
},
}