@justia/eslint-config-ts
Version:
Justia's ESLint configuration for TypeScript projects
80 lines (79 loc) • 2.8 kB
JavaScript
;
const config = {
rules: {
'default-param-last': 'off',
'@typescript-eslint/default-param-last': 'error',
'dot-notation': 'off',
'@typescript-eslint/dot-notation': 'error',
'init-declarations': 'off',
'@typescript-eslint/init-declarations': 'off',
'lines-between-class-members': 'off',
'@typescript-eslint/lines-between-class-members': [
'error',
'always',
{
exceptAfterSingleLine: false,
exceptAfterOverload: true
}
],
'no-dupe-class-members': 'off',
'@typescript-eslint/no-dupe-class-members': 'error',
'no-invalid-this': 'off',
'@typescript-eslint/no-invalid-this': 'off',
'no-loss-of-precision': 'off',
'@typescript-eslint/no-loss-of-precision': 'error',
'no-magic-numbers': 'off',
'@typescript-eslint/no-magic-numbers': 'off',
'no-unused-expressions': 'off',
'@typescript-eslint/no-unused-expressions': [
'error',
{
allowShortCircuit: false,
allowTernary: false,
allowTaggedTemplates: false
}
],
'no-use-before-define': 'off',
'@typescript-eslint/no-use-before-define': [
'error',
{
functions: true,
classes: true,
variables: true,
enums: true,
typedefs: true
}
],
'no-useless-constructor': 'off',
'@typescript-eslint/no-useless-constructor': 'error',
'no-return-await': 'off',
'@typescript-eslint/return-await': 'error',
'no-throw-literal': 'off',
'@typescript-eslint/no-throw-literal': 'off',
'no-loop-func': 'off',
'@typescript-eslint/no-loop-func': 'error',
'no-redeclare': 'off',
'@typescript-eslint/no-redeclare': 'off',
'no-restricted-imports': 'off',
'@typescript-eslint/no-restricted-imports': 'off',
'no-shadow': 'off',
'@typescript-eslint/no-shadow': 'error',
'padding-line-between-statements': 'off',
'@typescript-eslint/padding-line-between-statements': 'off',
'class-methods-use-this': 'off',
'@typescript-eslint/class-methods-use-this': 'error',
'consistent-return': 'off',
'@typescript-eslint/consistent-return': 'error',
'max-params': 'off',
'@typescript-eslint/max-params': 'off',
'prefer-destructuring': 'off',
'@typescript-eslint/prefer-destructuring': [
'error',
{
array: true,
object: true
}
]
}
};
module.exports = config;