generated from nhcarrigan/template
89 lines
2.3 KiB
JavaScript
89 lines
2.3 KiB
JavaScript
module.exports = {
|
|
env: {
|
|
es2020: true,
|
|
node: true,
|
|
},
|
|
extends: [
|
|
"eslint:recommended",
|
|
"plugin:@typescript-eslint/recommended",
|
|
"plugin:prettier/recommended",
|
|
"plugin:jsdoc/recommended",
|
|
"plugin:import/recommended",
|
|
"plugin:import/typescript",
|
|
"plugin:deprecation/recommended",
|
|
],
|
|
parser: "@typescript-eslint/parser",
|
|
parserOptions: {
|
|
ecmaVersion: 11,
|
|
sourceType: "module",
|
|
},
|
|
plugins: ["@typescript-eslint", "jsdoc", "import", "no-only-tests", "eslint-plugin-deprecation"],
|
|
rules: {
|
|
"linebreak-style": ["error", "unix"],
|
|
quotes: ["error", "double", { allowTemplateLiterals: true }],
|
|
semi: ["error", "always"],
|
|
"prefer-const": "warn",
|
|
eqeqeq: ["error", "always"],
|
|
curly: ["error"],
|
|
"require-atomic-updates": ["warn"],
|
|
"no-var": ["error"],
|
|
camelcase: ["error"],
|
|
"comma-dangle": ["error", "never"],
|
|
"init-declarations": ["error", "always"],
|
|
"require-await": ["warn"],
|
|
"no-param-reassign": ["error"],
|
|
"jsdoc/require-jsdoc": [
|
|
"warn",
|
|
{
|
|
require: {
|
|
ArrowFunctionExpression: true,
|
|
ClassDeclaration: true,
|
|
ClassExpression: true,
|
|
FunctionDeclaration: true,
|
|
FunctionExpression: true,
|
|
MethodDefinition: true,
|
|
},
|
|
publicOnly: true,
|
|
},
|
|
],
|
|
"jsdoc/require-description-complete-sentence": "warn",
|
|
"import/first": "warn",
|
|
"import/exports-last": "warn",
|
|
"import/newline-after-import": "warn",
|
|
"import/order": [
|
|
"warn",
|
|
{
|
|
groups: [
|
|
"builtin",
|
|
"external",
|
|
"internal",
|
|
"parent",
|
|
"sibling",
|
|
"index",
|
|
"object",
|
|
"type",
|
|
"unknown",
|
|
],
|
|
"newlines-between": "always",
|
|
alphabetize: {
|
|
order: "asc",
|
|
caseInsensitive: true,
|
|
},
|
|
},
|
|
],
|
|
// This is necessary due to the combination of TS and such
|
|
"import/no-unresolved": "off",
|
|
"import/no-self-import": "error",
|
|
"import/no-anonymous-default-export": "warn",
|
|
"import/no-useless-path-segments": "warn",
|
|
"no-only-tests/no-only-tests": [
|
|
"warn",
|
|
{
|
|
block: ["test", "expect", "assert", "describe", "bench"],
|
|
focus: ["only", "skip"],
|
|
},
|
|
],
|
|
"no-console": "warn",
|
|
},
|
|
};
|