2 const { defineConfig
} = require('eslint-define-config')
4 module
.exports
= defineConfig({
14 plugins
: ['promise', 'prettierx', 'jsdoc', 'spellcheck'],
18 'plugin:import/recommended',
19 'plugin:jsdoc/recommended',
20 'plugin:promise/recommended',
21 'plugin:prettierx/standardx'
29 ignoreMemberSort
: true,
30 ignoreDeclarationSort
: true
34 'spellcheck/spell-checker': [
50 skipIfMatch
: ['^@.*', '^plugin:.*']
57 parser
: '@typescript-eslint/parser',
58 plugins
: ['@typescript-eslint'],
60 'plugin:@typescript-eslint/recommended',
61 'plugin:import/typescript'
64 // We have some intentionally empty functions
65 '@typescript-eslint/no-empty-function': 'off',
67 '@typescript-eslint/no-inferrable-types': [
69 { ignoreProperties
: true }
72 'no-useless-constructor': 'off',
74 'jsdoc/match-description': [
78 // '/^[A-Z`].+?(\\.|:)(\\n\\n.*((\\n{1,2}- .+)|(_.+_)|`.+`|\\n\\n---))?$/us',
79 // matchDescription: '^[A-Z`].+(\\.|`.+`)$',
87 'jsdoc/no-types': 'error',
88 'jsdoc/require-jsdoc': [
93 'ClassProperty:not([accessibility=/(private|protected)/])',
94 'ExportNamedDeclaration:has(VariableDeclaration)',
96 'MethodDefinition:not([accessibility=/(private|protected)/]) > FunctionExpression',
98 'TSInterfaceDeclaration',
100 // 'TSPropertySignature',
101 'TSTypeAliasDeclaration'
105 'jsdoc/require-param-type': 'off',
106 'jsdoc/require-returns-type': 'off'
111 extends: 'plugin:node/recommended'
114 files
: ['tests/**/*.js'],
116 'jsdoc/require-jsdoc': 'off'
120 files
: ['benchmarks/**/*.js'],
122 'jsdoc/require-jsdoc': 'off'
126 files
: ['examples/**/*.js'],
128 'node/no-missing-require': 'off',
129 'jsdoc/require-jsdoc': 'off'
133 files
: ['examples/typescript/**/*.ts'],
135 'import/no-unresolved': 'off',
136 'jsdoc/require-jsdoc': 'off'