mirror of
https://github.com/standardnotes/web.git
synced 2024-10-27 08:20:14 +03:00
61 lines
1.8 KiB
JavaScript
61 lines
1.8 KiB
JavaScript
module.exports = {
|
|
root: true,
|
|
parser: '@typescript-eslint/parser',
|
|
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'],
|
|
parserOptions: {
|
|
project: './tsconfig.json',
|
|
tsconfigRootDir: __dirname,
|
|
},
|
|
plugins: ['@typescript-eslint', 'prettier'],
|
|
ignorePatterns: ['**/*.spec.ts'],
|
|
rules: {
|
|
'standard/no-callback-literal': 0, // Disable this as we have too many callbacks relying on literals
|
|
'no-throw-literal': 0,
|
|
camelcase: 'off',
|
|
'sort-imports': 'off',
|
|
'eol-last': 'error',
|
|
'no-multiple-empty-lines': ['error', { max: 1, maxEOF: 0 }],
|
|
'no-trailing-spaces': 'error',
|
|
'@typescript-eslint/no-explicit-any': 'warn',
|
|
'@typescript-eslint/no-unused-vars': [
|
|
'error',
|
|
{
|
|
vars: 'all',
|
|
args: 'after-used',
|
|
ignoreRestSiblings: false,
|
|
argsIgnorePattern: '^_',
|
|
varsIgnorePattern: '^_',
|
|
},
|
|
],
|
|
'@typescript-eslint/no-floating-promises': ['error'],
|
|
'block-scoped-var': 'error',
|
|
'comma-dangle': ['error', 'always-multiline'],
|
|
curly: ['error', 'all'],
|
|
'no-confusing-arrow': 'error',
|
|
'no-inline-comments': 'warn',
|
|
'no-invalid-this': 'error',
|
|
'no-return-assign': 'warn',
|
|
'no-constructor-return': 'error',
|
|
'no-duplicate-imports': 'error',
|
|
'no-self-compare': 'error',
|
|
'no-console': ['warn', { allow: ['warn', 'error'] }],
|
|
'no-unmodified-loop-condition': 'error',
|
|
'no-unused-private-class-members': 'error',
|
|
'object-curly-spacing': ['error', 'always'],
|
|
quotes: ['error', 'single', { avoidEscape: true }],
|
|
semi: ['error', 'never'],
|
|
'prettier/prettier': [
|
|
'error',
|
|
{
|
|
singleQuote: true,
|
|
trailingComma: 'all',
|
|
printWidth: 120,
|
|
semi: false,
|
|
},
|
|
{
|
|
usePrettierrc: false,
|
|
},
|
|
],
|
|
},
|
|
}
|