},
parser: '@typescript-eslint/parser',
parserOptions: {
- ecmaVersion: 12,
+ ecmaVersion: 2020,
sourceType: 'module'
},
- plugins: ['@typescript-eslint', 'prettierx'],
+ plugins: [
+ '@typescript-eslint',
+ 'promise',
+ 'prettierx',
+ 'jsdoc',
+ 'spellcheck'
+ ],
extends: [
'standard',
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
+ 'plugin:import/errors',
+ 'plugin:import/warnings',
+ 'plugin:import/typescript',
+ 'plugin:promise/recommended',
'plugin:prettierx/standardx',
'plugin:prettierx/@typescript-eslint'
],
rules: {
'no-void': 'off',
- // Disabled because it reports these for js files
- '@typescript-eslint/no-var-requires': 'off',
-
// We have some intentionally empty functions
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-inferrable-types': [
'error',
{ ignoreProperties: true }
+ ],
+
+ 'sort-imports': [
+ 'warn',
+ {
+ ignoreMemberSort: true,
+ ignoreDeclarationSort: true
+ }
+ ],
+
+ 'spellcheck/spell-checker': [
+ 'warn',
+ {
+ skipWords: [
+ 'poolifier',
+ 'pioardi',
+ 'christopher',
+ 'ecma',
+ 'jsdoc',
+ 'readonly',
+ 'serializable',
+ 'unregister',
+ 'workerpool'
+ ],
+ skipIfMatch: ['^@.*', '^plugin:.*']
+ }
]
- }
+ },
+ overrides: [
+ {
+ files: ['src/**/*.ts'],
+ extends: 'plugin:jsdoc/recommended',
+ rules: {
+ 'jsdoc/no-types': 'error',
+ 'jsdoc/require-param-type': 'off',
+ 'jsdoc/require-returns-type': 'off'
+ }
+ },
+ {
+ files: ['*.js'],
+ extends: 'plugin:node/recommended',
+ rules: {
+ '@typescript-eslint/no-unused-vars': 'off',
+ '@typescript-eslint/no-var-requires': 'off'
+ }
+ },
+ {
+ files: ['examples/typescript/**/*.ts'],
+ rules: {
+ 'import/no-unresolved': 'off'
+ }
+ },
+ {
+ files: ['examples/**/*.js'],
+ rules: {
+ 'node/no-missing-require': 'off'
+ }
+ }
+ ]
}