gulp-spawner
Version:
Idiotmatic and flexible process handling for gulp
298 lines (297 loc) • 7.96 kB
JSON
{
"root": true,
"env": {
"node": true
},
"ignorePatterns": ["node_modules", "dist"],
// https://eslint.org/docs/rules/
"rules": {
"no-console": 0,
"no-alert": 2,
// code smells
"no-extra-parens": 0, // conflicts with prettier
"no-promise-executor-return": 2,
"no-template-curly-in-string": 2,
"no-unreachable-loop": 2,
"no-useless-backreference": 2,
"require-atomic-updates": 2,
// best practices
"array-callback-return": 2,
"block-scoped-var": 2,
"class-methods-use-this": 2,
"complexity": 2,
"consistent-return": 2,
"default-case": 2,
"default-case-last": 2,
"default-param-last": 2,
// "dot-location": 2, // incompatible with prettier
"dot-notation": 2,
"eqeqeq": 2,
"grouped-accessor-pairs": 2,
"no-caller": 2,
"no-constructor-return": 2,
"no-div-regex": 2,
"no-else-return": 2,
// "no-empty-function": 2, // redundant for ts plugin
"no-empty-pattern": 2,
"no-eq-null": 2,
"no-eval": 2,
"no-extend-native": 2,
"no-extra-bind": 2,
"no-extra-label": 2,
"no-floating-decimal": 2,
"no-implicit-coercion": 2,
"no-implicit-globals": 2,
"no-implied-eval": 2,
"no-invalid-this": 2,
"no-iterator": 2,
"no-labels": 2,
"no-lone-blocks": 2,
"no-loop-func": 2,
"no-magic-numbers": [1, { "ignoreArrayIndexes": true }],
// "no-multi-spaces": 2, // should be allowed for comments and other formatting
"no-new": 2,
"no-new-func": 2,
"no-new-wrappers": 2,
"no-param-reassign": 2,
"no-proto": 2,
"no-restricted-properties": 2,
"no-return-assign": 2,
"no-return-await": 2,
"no-script-url": 2,
"no-self-compare": 2,
"no-sequences": 2,
"no-throw-literal": 2,
"no-unused-expressions": 2,
"no-useless-call": 2,
"no-useless-catch": 2,
"no-useless-concat": 2,
"no-useless-return": 2,
"prefer-named-capture-group": 2,
"prefer-promise-reject-errors": 2,
"prefer-regex-literals": 2,
"require-await": 2,
"wrap-iife": 2,
"yoda": 2,
// variable treatment
"no-label-var": 2,
"no-restricted-globals": 2,
"no-shadow": 2,
"no-undefined": 0,
// "no-use-before-define": 1,
// style
// "array-bracket-newline": [
// 2,
// {
// "multiline": true,
// "minItems": 4
// }
// ],
// "array-bracket-spacing": [
// 2,
// "always",
// {
// "singleValue": false,
// "objectsInArrays": false
// }
// ],
// "array-element-newline": [
// 2,
// "consistent",
// {
// "multiline": true,
// "minItems": 4
// }
// ],
// "block-spacing": 2,
// "brace-style": [2, "1tbs"],
// "camelcase": 1,
// "comma-dangle": [2, "always-multiline"],
// "comma-spacing": 1,
// "computed-property-spacing": 2,
// "consistent-this": 2,
// "eol-last": 2,
// "func-name-matching": 2,
// "func-names": [2, "as-needed"],
// "func-style": [2, "expression"],
// "function-call-argument-newline": [2, "consistent"],
// "function-paren-newline": [2, "multiline"],
// "implicit-arrow-linebreak": [2, "beside"],
// "indent": [2, 4],
// "jsx-quotes": [2, "prefer-double"],
// "key-spacing": [
// 2,
// {
// "mode": "minimum",
// "align": "value"
// }
// ],
// "keyword-spacing": 2,
// "linebreak-style": [2, "unix"],
// "lines-around-comment": [
// 2,
// {
// "beforeBlockComment": true,
// "afterBlockComment": false,
// "beforeLineComment": true,
// "afterLineComment": false
// }
// ],
// "lines-between-class-members": [
// 2,
// "always",
// {
// "exceptAfterSingleLine": true
// }
// ],
// "max-depth": [2, 4],
// "max-len": [
// 2,
// {
// "code": 80,
// "ignoreUrls": true,
// "ignoreStrings": false,
// "ignoreTemplateLiterals": false,
// "ignoreRegExpLiterals": false
// }
// ],
"max-lines": [2, 400],
"max-lines-per-function": [1, 25],
"max-nested-callbacks": [2, 3],
"max-statements": [2, 20],
// "max-statements-per-line": [
// 2,
// {
// "max": 3
// }
// ],
// "multiline-comment-style": [2, "starred-block"],
// "multiline-ternary": [2, "always-multiline"],
// "new-cap": [
// 2,
// {
// "newIsCap": true,
// "capIsNew": false,
// "newIsCapExceptionPattern": "_.*"
// }
// ],
// "new-parens": 2,
// "newline-per-chained-call": [
// 2,
// {
// "ignoreChainWithDepth": 3
// }
// ],
// "no-array-constructor": 2,
// "no-bitwise": 1,
// "no-continue": 2,
// "no-lonely-if": 2,
// "no-multi-assign": 2,
// "no-multiple-empty-lines": 2,
// "no-negated-condition": 2,
// "no-nested-ternary": 2,
// "no-new-object": 2,
// "no-tabs": 2,
// "no-ternary": 0,
// "no-trailing-spaces": 2,
// "no-unneeded-ternary": 2,
// "no-whitespace-before-property": 2,
// "nonblock-statement-body-position": [2, "beside"],
// "object-curly-newline": [
// 2,
// {
// "multiline": true,
// "minProperties": 3,
// "consistent": true
// }
// ],
// "object-curly-spacing": [2, "always"],
// "object-property-newline": [
// 2,
// {
// "allowAllPropertiesOnSameLine": true
// }
// ],
// "one-var": [
// 2,
// {
// "initialized": "never",
// "uninitialized": "always"
// }
// ],
// "one-var-declaration-per-line": [2, "initializations"],
// "operator-assignment": [2, "always"],
// "operator-linebreak": [2, "none"],
// "padded-blocks": [
// 2,
// "never",
// {
// "allowSingleLineBlocks": true
// }
// ],
// "prefer-exponentiation-operator": 2,
// "prefer-object-spread": 2,
// "quote-props": [2, "as-needed"],
// "quotes": 2,
// "semi": 2,
// "semi-spacing": 2,
// "semi-style": 2,
// "sort-keys": 2,
// // "sort-vars": 2,
// "space-before-blocks": 2,
// "space-before-function-paren": [2, "never"],
// "space-in-parens": [2, "never"],
// "space-unary-ops": 2,
// "switch-colon-spacing": 2,
// "template-tag-spacing": [2, "never"],
// "wrap-regex": 0,
// from plugins
"no-loops/no-loops": 2
},
"globals": {
"Promise": "readonly",
"Set": "readonly",
"Map": "readonly"
},
"overrides": [
{
// plain js config
"files": ["**/*.js"],
"parser": "espree",
"parserOptions": {
"ecmaVersion": 2017,
"ecmaFeatures": { "impliedStrict": true }
},
"plugins": ["no-loops"],
"extends": ["eslint:recommended", "prettier"],
"rules": { "strict": 2 }
},
// {
// // typescript
// "files": ["**/*.ts"],
// "parser": "@typescript-eslint/parser",
// "plugins": ["@typescript-eslint", "no-loops"],
// "extends": [
// "eslint:recommended",
// "plugin:@typescript-eslint/eslint-recommended",
// "plugin:@typescript-eslint/recommended",
// "prettier"
// ]
// },
{
// intern
"files": ["intern/**/*.js"],
"rules": {
"no-magic-numbers": 0,
"no-unused-expressions": 0,
"no-invalid-this": 0,
"max-lines-per-function": 0,
"max-statements": 0,
"max-nested-callbacks": [2, 5]
},
"globals": {
"intern": "readonly"
}
}
]
}