Skip to content

Commit

Permalink
Merge pull request #300 from lo1tuma/drop-hc
Browse files Browse the repository at this point in the history
Remove eslint-config-holidaycheck dev dependency
  • Loading branch information
lo1tuma committed Oct 18, 2021
2 parents d1c421b + a298dd5 commit 8f08319
Show file tree
Hide file tree
Showing 4 changed files with 2,107 additions and 1,745 deletions.
290 changes: 280 additions & 10 deletions .eslintrc.json
@@ -1,36 +1,306 @@
{
"extends": [
"holidaycheck/es2015",
"plugin:eslint-plugin/recommended"
],
"extends": [ "plugin:eslint-plugin/recommended" ],

"plugins": [
"eslint-plugin",
"node",
"unicorn"
],

"env": {
"node": true
"node": true,
"es6": true
},

"parserOptions": {
"sourceType": "script",
"ecmaVersion": 2017
"ecmaVersion": 2017,
"ecmaFeatures": {
"jsx": false,
"globalReturn": false,
"impliedStrict": false
}
},

"rules": {
"eslint-plugin/require-meta-docs-url": [
"array-callback-return": "error",
"no-alert": "error",
"no-array-constructor": "error",
"no-bitwise": "error",
"no-caller": "error",
"no-case-declarations": "off",
"no-catch-shadow": "error",
"no-cond-assign": "error",
"no-console": "error",
"no-constant-condition": "error",
"no-continue": "error",
"no-control-regex": "error",
"no-debugger": "error",
"no-delete-var": "error",
"no-div-regex": "error",
"no-dupe-keys": "error",
"no-dupe-args": "error",
"no-duplicate-case": "error",
"no-else-return": "error",
"no-empty": "error",
"no-empty-character-class": "error",
"no-empty-function": "off",
"no-ex-assign": "error",
"no-extend-native": "error",
"no-extra-bind": "error",
"no-extra-boolean-cast": "error",
"no-extra-label": "error",
"no-extra-parens": "error",
"no-extra-semi": "error",
"no-fallthrough": "error",
"no-floating-decimal": "error",
"no-func-assign": "error",
"no-implicit-coercion": "error",
"no-implicit-globals": "off",
"no-implied-eval": "error",
"no-inline-comments": "error",
"no-inner-declarations": [ "error", "functions"],
"no-invalid-regexp": "error",
"no-irregular-whitespace": "error",
"no-iterator": "error",
"no-label-var": "error",
"no-labels": "error",
"no-lone-blocks": "error",
"no-lonely-if": "error",
"no-loop-func": "error",
"no-mixed-requires": "off",
"no-mixed-spaces-and-tabs": "error",
"linebreak-style": [ "error", "unix"],
"no-multi-spaces": "error",
"no-multi-str": "error",
"no-multiple-empty-lines": [ "error", { "max": 1 } ],
"no-global-assign": "error",
"no-negated-condition": "off",
"no-nested-ternary": "error",
"no-new": "error",
"no-new-func": "error",
"no-new-object": "error",
"no-new-require": "error",
"no-new-wrappers": "error",
"no-obj-calls": "error",
"no-octal": "error",
"no-octal-escape": "error",
"no-param-reassign": [ "error", { "props": true } ],
"no-path-concat": "error",
"no-plusplus": "error",
"no-process-env": "error",
"no-process-exit": "error",
"no-proto": "error",
"no-prototype-builtins": "off",
"no-redeclare": [ "error", { "builtinGlobals": true } ],
"no-regex-spaces": "error",
"no-restricted-globals": "off",
"no-restricted-imports": "off",
"no-restricted-modules": "off",
"no-restricted-syntax": "off",
"no-return-assign": "error",
"no-script-url": "error",
"no-self-assign": "error",
"no-self-compare": "error",
"no-sequences": "error",
"no-shadow": [ "error", { "builtinGlobals": true } ],
"no-shadow-restricted-names": "error",
"no-sparse-arrays": "error",
"no-sync": "error",
"no-tabs": "error",
"no-ternary": "off",
"no-trailing-spaces": "error",
"no-throw-literal": "error",
"no-undef": "error",
"no-undef-init": "error",
"no-undefined": "off",
"no-unexpected-multiline": "off",
"no-underscore-dangle": "off",
"no-unmodified-loop-condition": "error",
"no-unneeded-ternary": "error",
"no-unreachable": "error",
"no-unsafe-finally": "error",
"no-unused-expressions": "error",
"no-unused-labels": "error",
"no-unused-vars": "error",
"no-use-before-define": "error",
"no-useless-call": "error",
"no-useless-computed-key": "error",
"no-useless-concat": "off",
"no-useless-constructor": "error",
"no-useless-escape": "error",
"no-whitespace-before-property": "error",
"no-void": "error",
"no-warning-comments": [
"error",
{ "pattern": "https://github.com/lo1tuma/eslint-plugin-mocha/blob/master/docs/rules/{{name}}.md" }
{
"terms": [
"todo",
"fixme",
"wtf",
"falls through",
"istanbul"
],
"location": "anywhere"
}
],
"no-with": "error",
"no-magic-numbers": "off",
"no-mixed-operators": "off",
"array-bracket-spacing": [ "error", "always"],
"array-bracket-newline": "off",
"array-element-newline": "off",
"arrow-body-style": "off",
"accessor-pairs": "off",
"block-scoped-var": "off",
"block-spacing": "off",
"brace-style": [ "error", "1tbs"],
"callback-return": "off",
"camelcase": "error",
"comma-dangle": [ "error", "never"],
"comma-spacing": [ "error", { "before": false, "after": true } ],
"comma-style": [ "error", "last"],
"complexity": [ "error", 4 ],
"computed-property-spacing": [ "error", "never"],
"consistent-return": "error",
"consistent-this": [ "error", "self"],
"curly": [ "error", "all"],
"default-case": "error",
"dot-location": [ "error", "property"],
"dot-notation": "error",
"eol-last": "error",
"eqeqeq": "error",
"func-names": "off",
"func-style": "off",
"global-require": "off",
"guard-for-in": "error",
"handle-callback-err": [ "error", "^(e$|(e|(.*(_e|E)))rr)"],
"id-length": "off",
"indent": [ "error", 4, { "SwitchCase": 0, "VariableDeclarator": 1, "MemberExpression": 1 } ],
"init-declarations": "off",
"jsx-quotes": "off",
"key-spacing": [ "error", { "beforeColon": false, "afterColon": true } ],
"lines-around-comment": "off",
"max-depth": [ "error", 3 ],
"max-len": [ "error", 120, 4 ],
"max-lines": "off",
"max-nested-callbacks": [ "error", 3 ],
"max-params": [ "error", 4 ],
"max-statements": [ "error", 10 ],
"multiline-ternary": "off",
"max-statements-per-line": "off",
"new-cap": "error",
"new-parens": "error",
"newline-per-chained-call": "off",
"object-curly-newline": "off",
"object-curly-spacing": [ "error", "always"],
"object-property-newline": "off",
"one-var-declaration-per-line": "off",
"operator-assignment": [ "error", "always"],
"operator-linebreak": [ "error", "after"],
"padded-blocks": [ "error", { "blocks": "never", "switches": "never", "classes": "never"} ],
"prefer-arrow-callback": "off",
"quote-props": [ "error", "as-needed"],
"quotes": [ "error", "single"],
"radix": "error",
"id-match": "off",
"id-blacklist": "off",
"require-jsdoc": "off",
"semi": "error",
"semi-spacing": [ "error", { "before": false, "after": true } ],
"sort-vars": "off",
"keyword-spacing": [ "error", { "before": true, "after": true } ],
"space-before-blocks": [ "error", "always"],
"space-before-function-paren": [ "error", { "anonymous": "always", "named": "never"} ],
"space-in-parens": [ "error", "never"],
"space-infix-ops": "error",
"space-unary-ops": "error",
"spaced-comment": [ "error", "always"],
"sort-imports": "off",
"strict": ["error", "global"],
"template-curly-spacing": "off",
"unicode-bom": ["error", "never"],
"use-isnan": "error",
"valid-jsdoc": "off",
"valid-typeof": "error",
"vars-on-top": "error",
"wrap-iife": [ "error", "outside"],
"wrap-regex": "error",
"yield-star-spacing": "off",
"yoda": [ "error", "never"],
"capitalized-comments": "off",
"class-methods-use-this": "off",
"func-call-spacing": [ "error", "never"],
"func-name-matching": "off",
"line-comment-position": "off",
"no-await-in-loop": "off",
"no-compare-neg-zero": "error",
"no-multi-assign": "error",
"no-restricted-properties": "off",
"no-return-await": "off",
"no-template-curly-in-string": "off",
"no-unsafe-negation": "error",
"no-useless-return": "error",
"nonblock-statement-body-position": "off",
"prefer-destructuring": "off",
"prefer-promise-reject-errors": "error",
"require-await": "off",
"sort-keys": "off",
"for-direction": "off",
"no-buffer-constructor": "off",
"padding-line-between-statements": [
"error",
{ "blankLine": "always", "prev": "directive", "next": "*"},
{ "blankLine": "any", "prev": "directive", "next": "directive"}
],
"semi-style": [ "error", "last"],
"switch-colon-spacing": [ "error", { "after": true, "before": false } ],
"function-paren-newline": "off",
"getter-return": [ "error", { "allowImplicit": false } ],
"multiline-comment-style": "off",
"max-classes-per-file": "off",
"max-lines-per-function": "off",
"prefer-object-spread": "off",
"arrow-parens": "error",
"arrow-spacing": [ "error", {"before": true,"after": true } ],
"constructor-super": "error",
"generator-star-spacing": [ "error", {"before": true,"after": false } ],
"no-confusing-arrow": "error",
"no-class-assign": "error",
"no-const-assign": "error",
"no-dupe-class-members": "error",
"no-duplicate-imports": "error",
"no-empty-pattern": "error",
"no-invalid-this": "off",
"no-new-symbol": "error",
"no-this-before-super": "error",
"no-var": "error",
"object-shorthand": [ "error", "always"],
"one-var": [ "error", {"var": "always","let": "never","const": "never"} ],
"prefer-const": "error",
"prefer-spread": "error",
"prefer-template": "error",
"require-yield": "error",
"no-useless-rename": "error",
"rest-spread-spacing": [ "error", "never"],
"prefer-rest-params": "error",
"prefer-numeric-literals": "error",
"symbol-description": "error",
"template-tag-spacing": [ "error", "never"],
"implicit-arrow-linebreak": [ "error", "beside"],
"lines-between-class-members": [ "error", "always"],

"node/no-unsupported-features": "error",
"unicorn/prefer-includes": "error"
"unicorn/prefer-includes": "error",
"eslint-plugin/require-meta-docs-url": [
"error",
{ "pattern": "https://github.com/lo1tuma/eslint-plugin-mocha/blob/master/docs/rules/{{name}}.md" }
]
},

"overrides": [
{
"files": [ "test/**/*.js", "benchmarks/**/*.js" ],
"files": [ "test/**/*.js", "benchmarks/**/*.js"],
"env": { "mocha": true },
"rules": {
"max-nested-callbacks": [ "error", 8 ],
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/runtime.bench.js
Expand Up @@ -96,7 +96,7 @@ describe('runtime', () => {

const { medianDuration } = runBenchmark(() => {
lintManyFilesWithAllRecommendedRules({ numberOfFiles: 350 });
}, 5);
}, 50);

expect(medianDuration).to.be.below(budget);
});
Expand All @@ -106,7 +106,7 @@ describe('runtime', () => {

const { medianMemory } = runBenchmark(() => {
lintManyFilesWithAllRecommendedRules({ numberOfFiles: 350 });
}, 5);
}, 50);

expect(medianMemory).to.be.below(budget);
});
Expand Down

0 comments on commit 8f08319

Please sign in to comment.