Spaces:
Runtime error
Runtime error
File size: 1,906 Bytes
3de2a7a b450589 3de2a7a b450589 3de2a7a |
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 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'],
plugins: ['svelte3', '@typescript-eslint'],
ignorePatterns: ['*.cjs'],
overrides: [{ files: ['*.svelte'], processor: 'svelte3/svelte3' }],
settings: {
'svelte3/typescript': () => require('typescript')
},
parserOptions: {
sourceType: 'module',
ecmaVersion: 2020,
ecmaFeatures: {
impliedStrict: true
}
},
env: {
browser: true,
es2017: true,
node: true
},
rules: {
// Best Practices
'class-methods-use-this': 'warn',
'no-lone-blocks': 'error',
'no-self-compare': 'error',
'no-sequences': 'error',
'no-useless-concat': 'error',
'vars-on-top': 'error',
yoda: 'error',
// Variables
'no-use-before-define': 'error',
// Stylistic Issues
'comma-dangle': ['warn', 'only-multiline'],
'eol-last': 'warn',
'function-paren-newline': 'warn',
'implicit-arrow-linebreak': 'error',
'key-spacing': 'warn',
'keyword-spacing': 'warn',
'max-depth': ['warn', { max: 6 }],
'max-nested-callbacks': ['warn', { max: 4 }],
'max-params': ['warn', { max: 5 }],
'max-statements-per-line': 'error',
'new-cap': [
'warn',
{
newIsCap: true,
capIsNew: false,
properties: false
}
],
'no-mixed-operators': 'warn',
'no-multi-assign': 'warn',
'no-multiple-empty-lines': 'warn',
'no-nested-ternary': 'warn',
'no-trailing-spaces': 'warn',
'no-whitespace-before-property': 'error',
'one-var-declaration-per-line': 'warn',
'quote-props': ['error', 'consistent-as-needed'],
semi: ['warn', 'always'],
'semi-spacing': 'error',
'semi-style': 'error',
'space-before-function-paren': 'off',
'switch-colon-spacing': 'error',
// ECMAScript 6
'arrow-spacing': 'warn',
'no-useless-computed-key': 'warn',
'no-useless-constructor': 'error',
'prefer-const': 'warn'
}
};
|