@berlysia/eslint-config
Advanced tools
Comparing version 1.2.2 to 1.3.0
@@ -340,3 +340,10 @@ module.exports = { | ||
"prefer-exponentiation-operator": "error", | ||
"default-case-last": "error", | ||
"id-denylist": "off", | ||
"no-loss-of-precision": "error", | ||
"no-promise-executor-return": "error", | ||
"no-restricted-exports": "off", | ||
"no-unreachable-loop": "error", | ||
"no-useless-backreference": "error", | ||
}, | ||
}; |
@@ -15,6 +15,2 @@ module.exports = { | ||
.concat("prettier"), | ||
plugins: ["prettier"], | ||
rules: { | ||
"prettier/prettier": "error", | ||
}, | ||
}; |
@@ -25,3 +25,2 @@ module.exports = { | ||
"jest/no-standalone-expect": "error", | ||
"jest/no-test-callback": "error", | ||
"jest/no-test-prefixes": "error", | ||
@@ -48,3 +47,8 @@ "jest/no-test-return-statement": "error", | ||
"jest/valid-title": "error", | ||
"jest/no-conditional-expect": "error", | ||
"jest/no-deprecated-functions": "error", | ||
"jest/no-done-callback": "error", | ||
"jest/no-interpolation-in-snapshots": "error", | ||
"jest/no-restricted-matchers": "error", | ||
}, | ||
}; |
{ | ||
"name": "@berlysia/eslint-config", | ||
"version": "1.2.2", | ||
"version": "1.3.0", | ||
"description": "", | ||
"main": "index.js", | ||
"scripts": { | ||
"lint": "eslint './**/*.{js,ts}'", | ||
"fix": "npm run lint -- --fix", | ||
"lint": "run-p lint:*", | ||
"lint:eslint": "eslint './**/*.{js,ts}'", | ||
"lint:prettier": "prettier . --check", | ||
"fix": "run-s fix:eslint fix:prettier", | ||
"fix:eslint": "yarn lint:eslint --fix", | ||
"fix:prettier": "yarn lint:prettier --write", | ||
"format": "prettier '*.{json,md}'", | ||
@@ -26,12 +30,12 @@ "test:typescript": "node ./tools/typescript/verify", | ||
"dependencies": { | ||
"@typescript-eslint/eslint-plugin": "^2.0.0", | ||
"@typescript-eslint/parser": "^2.0.0", | ||
"@typescript-eslint/eslint-plugin": "^4.0.0", | ||
"@typescript-eslint/parser": "^4.0.0", | ||
"eslint-config-prettier": "^6.0.0", | ||
"eslint-plugin-eslint-comments": "^3.1.2", | ||
"eslint-plugin-flowtype": "^4.0.0", | ||
"eslint-plugin-flowtype": "^5.0.0", | ||
"eslint-plugin-import": "^2.18.0", | ||
"eslint-plugin-jest": "^23.0.0", | ||
"eslint-plugin-jest": "^24.0.0", | ||
"eslint-plugin-prettier": "^3.1.0", | ||
"eslint-plugin-react": "^7.14.2", | ||
"eslint-plugin-react-hooks": "^2.0.0", | ||
"eslint-plugin-react-hooks": "^4.0.0", | ||
"read-pkg-up": "^7.0.0" | ||
@@ -41,14 +45,15 @@ }, | ||
"babel-eslint": "10.1.0", | ||
"eslint": "6.8.0", | ||
"eslint-find-rules": "3.4.0", | ||
"husky": "4.2.3", | ||
"jest": "25.1.0", | ||
"lint-staged": "10.0.8", | ||
"eslint": "7.13.0", | ||
"eslint-find-rules": "3.6.1", | ||
"husky": "4.3.0", | ||
"jest": "26.6.3", | ||
"lint-staged": "10.5.1", | ||
"npm-run-all": "4.1.5", | ||
"prettier": "2.0.2", | ||
"typescript": "3.8.3" | ||
"prettier": "2.1.2", | ||
"typescript": "4.1.2" | ||
}, | ||
"lint-staged": { | ||
"*.{js,ts}": [ | ||
"eslint --fix" | ||
"eslint --fix", | ||
"prettier --write" | ||
], | ||
@@ -55,0 +60,0 @@ "*.{json,md}": [ |
@@ -12,3 +12,4 @@ module.exports = { | ||
"eslint-comments/no-use": "off", | ||
"eslint-comments/require-description": "error", | ||
}, | ||
}; |
@@ -7,3 +7,3 @@ function add(a, b) { | ||
// eslint-disable-next-line no-undef | ||
// eslint-disable-next-line no-undef -- jest sample | ||
test.todo("yay"); |
@@ -7,3 +7,3 @@ function add(a, b) { | ||
// eslint-disable-next-line no-undef | ||
// eslint-disable-next-line no-undef -- jest sample | ||
test.todo("yay"); |
@@ -5,3 +5,3 @@ export function sub(a: number, b: number): number { | ||
// eslint-disable-next-line no-undef | ||
// eslint-disable-next-line no-undef -- jest sample | ||
test.todo("yay"); |
module.exports = { | ||
extends: ["../../index.js", "../../typescript.js"].map(require.resolve), | ||
parserOptions: { | ||
project: "./tsconfig.json", | ||
}, | ||
overrides: [ | ||
{ | ||
files: ["*.ts"], | ||
extends: ["../../index.js", "../../typescript.js"].map(require.resolve), | ||
parserOptions: { | ||
project: "./tsconfig.json", | ||
}, | ||
}, | ||
], | ||
}; |
@@ -5,3 +5,6 @@ export function unusedArgs(a: number, b: number, _c: unknown): number { | ||
export function restSiblings(obj: { a: number; b: number }): number { | ||
export function restSiblings(obj: { | ||
readonly a: number; | ||
readonly b: number; | ||
}): number { | ||
const { a, ...rest } = obj; | ||
@@ -14,5 +17,5 @@ return rest.b; | ||
throw new Error(); | ||
} catch (_e) { | ||
} catch (_e: unknown) { | ||
return "yay"; | ||
} | ||
} |
@@ -12,2 +12,4 @@ module.exports = { | ||
"@typescript-eslint/await-thenable": "error", | ||
"dot-notation": "off", | ||
"@typescript-eslint/dot-notation": ["error"], | ||
"@typescript-eslint/naming-convention": [ | ||
@@ -39,2 +41,3 @@ "error", | ||
], | ||
"@typescript-eslint/no-base-to-string": "error", | ||
"@typescript-eslint/no-floating-promises": "error", | ||
@@ -46,16 +49,10 @@ "@typescript-eslint/no-for-in-array": "error", | ||
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "error", | ||
"@typescript-eslint/no-unnecessary-condition": [ | ||
"error", | ||
{ ignoreRhs: true }, | ||
], | ||
"@typescript-eslint/no-unnecessary-condition": "error", | ||
"@typescript-eslint/no-unnecessary-qualifier": "off", | ||
"@typescript-eslint/no-unnecessary-type-arguments": "off", | ||
"@typescript-eslint/no-unnecessary-type-assertion": "error", | ||
"@typescript-eslint/no-unused-vars-experimental": [ | ||
"error", | ||
{ | ||
ignoredNamesRegex: "^_", | ||
ignoreArgsIfArgsAfterAreUsed: true, | ||
}, | ||
], | ||
"@typescript-eslint/no-unsafe-assignment": "error", | ||
"@typescript-eslint/no-unsafe-call": "error", | ||
"@typescript-eslint/no-unsafe-member-access": "error", | ||
"@typescript-eslint/no-unsafe-return": "error", | ||
"@typescript-eslint/prefer-includes": "error", | ||
@@ -70,4 +67,6 @@ "@typescript-eslint/prefer-nullish-coalescing": [ | ||
"@typescript-eslint/prefer-readonly": "error", | ||
"@typescript-eslint/prefer-readonly-parameter-types": "error", | ||
"@typescript-eslint/prefer-regexp-exec": "error", | ||
"@typescript-eslint/prefer-string-starts-ends-with": "error", | ||
"@typescript-eslint/prefer-reduce-type-parameter": "error", | ||
"@typescript-eslint/promise-function-async": [ | ||
@@ -103,3 +102,4 @@ "error", | ||
], | ||
"@typescript-eslint/no-confusing-void-expression": "error", | ||
}, | ||
}; |
@@ -14,2 +14,3 @@ module.exports = { | ||
"@typescript-eslint/ban-ts-comment": "off", | ||
"@typescript-eslint/ban-tslint-comment": "error", | ||
"@typescript-eslint/ban-types": [ | ||
@@ -44,3 +45,2 @@ "error", | ||
], | ||
"@typescript-eslint/ban-ts-ignore": "off", | ||
"brace-style": "off", | ||
@@ -52,5 +52,3 @@ "@typescript-eslint/brace-style": [ | ||
], | ||
camelcase: "off", | ||
"@typescript-eslint/camelcase": "off", | ||
"@typescript-eslint/class-name-casing": "error", | ||
"@typescript-eslint/class-literal-property-style": ["error", "fields"], | ||
"comma-spacing": "off", | ||
@@ -76,17 +74,15 @@ "@typescript-eslint/comma-spacing": [ | ||
"@typescript-eslint/func-call-spacing": "off", | ||
"@typescript-eslint/generic-type-naming": "off", | ||
"@typescript-eslint/indent": "off", | ||
"@typescript-eslint/interface-name-prefix": ["error", "never"], | ||
"init-declarations": "off", | ||
"@typescript-eslint/init-declarations": ["error"], | ||
"keyword-spacing": "off", | ||
"@typescript-eslint/keyword-spacing": ["error"], | ||
"lines-between-class-members": "off", | ||
"@typescript-eslint/lines-between-class-members": ["error", "always"], | ||
"@typescript-eslint/member-delimiter-style": "off", | ||
"@typescript-eslint/member-naming": [ | ||
"error", | ||
{ | ||
public: "^[a-zA-Z]", | ||
private: "^[a-zA-Z]", | ||
protected: "^[a-zA-Z]", | ||
}, | ||
], | ||
"@typescript-eslint/member-ordering": "off", | ||
"@typescript-eslint/method-signature-style": "error", | ||
"@typescript-eslint/no-array-constructor": "error", | ||
"no-empty-function": "off", | ||
"@typescript-eslint/no-confusing-non-null-assertion": "error", | ||
"no-dupe-class-members": "off", | ||
@@ -104,2 +100,7 @@ "@typescript-eslint/no-dupe-class-members": "error", | ||
"@typescript-eslint/no-inferrable-types": "error", | ||
"no-invalid-this": "off", | ||
"@typescript-eslint/no-invalid-this": "error", | ||
"@typescript-eslint/no-invalid-void-type": "error", | ||
"no-loss-of-precision": "error", | ||
"@typescript-eslint/no-loss-of-precision": "error", | ||
"@typescript-eslint/no-magic-numbers": "off", | ||
@@ -114,3 +115,2 @@ "@typescript-eslint/no-misused-new": "error", | ||
"@typescript-eslint/no-type-alias": "off", | ||
"@typescript-eslint/no-untyped-public-signature": "error", | ||
"no-unused-expressions": "off", | ||
@@ -137,2 +137,9 @@ "@typescript-eslint/no-unused-expressions": [ | ||
], | ||
"@typescript-eslint/no-unused-vars-experimental": [ | ||
"error", | ||
{ | ||
ignoredNamesRegex: "^_", | ||
ignoreArgsIfArgsAfterAreUsed: true, | ||
}, | ||
], | ||
"no-use-before-define": "off", | ||
@@ -145,4 +152,6 @@ "@typescript-eslint/no-use-before-define": "error", | ||
"@typescript-eslint/prefer-function-type": "error", | ||
"@typescript-eslint/prefer-literal-enum-member": "error", | ||
"@typescript-eslint/prefer-namespace-keyword": "error", | ||
"@typescript-eslint/prefer-optional-chain": "error", | ||
"@typescript-eslint/prefer-ts-expect-error": "error", | ||
quotes: "off", | ||
@@ -159,3 +168,14 @@ "@typescript-eslint/quotes": "off", | ||
"@typescript-eslint/unified-signatures": "off", | ||
"@typescript-eslint/comma-dangle": "error", | ||
"@typescript-eslint/consistent-indexed-object-style": "error", | ||
"@typescript-eslint/consistent-type-imports": "error", | ||
"@typescript-eslint/no-duplicate-imports": "error", | ||
"@typescript-eslint/no-implicit-any-catch": "error", | ||
"@typescript-eslint/no-loop-func": "error", | ||
"@typescript-eslint/no-redeclare": "error", | ||
"@typescript-eslint/no-shadow": "error", | ||
"@typescript-eslint/no-unnecessary-type-constraint": "error", | ||
"@typescript-eslint/prefer-enum-initializers": "error", | ||
"@typescript-eslint/space-infix-ops": "error", | ||
}, | ||
}; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
49803
1272
+ Added@babel/code-frame@7.12.11(transitive)
+ Added@eslint/eslintrc@0.4.3(transitive)
+ Added@humanwhocodes/config-array@0.5.0(transitive)
+ Added@humanwhocodes/object-schema@1.2.1(transitive)
+ Added@nodelib/fs.scandir@2.1.5(transitive)
+ Added@nodelib/fs.stat@2.0.5(transitive)
+ Added@nodelib/fs.walk@1.2.8(transitive)
+ Added@typescript-eslint/eslint-plugin@4.33.0(transitive)
+ Added@typescript-eslint/experimental-utils@4.33.0(transitive)
+ Added@typescript-eslint/parser@4.33.0(transitive)
+ Added@typescript-eslint/scope-manager@4.33.0(transitive)
+ Added@typescript-eslint/types@4.33.0(transitive)
+ Added@typescript-eslint/typescript-estree@4.33.0(transitive)
+ Added@typescript-eslint/visitor-keys@4.33.0(transitive)
+ Addedajv@8.17.1(transitive)
+ Addedansi-colors@4.1.3(transitive)
+ Addedarray-union@2.1.0(transitive)
+ Addedastral-regex@2.0.0(transitive)
+ Addedbraces@3.0.3(transitive)
+ Addedcross-spawn@7.0.3(transitive)
+ Addeddir-glob@3.0.1(transitive)
+ Addedenquirer@2.4.1(transitive)
+ Addedescape-string-regexp@4.0.0(transitive)
+ Addedeslint@7.32.0(transitive)
+ Addedeslint-plugin-flowtype@5.10.0(transitive)
+ Addedeslint-plugin-jest@24.7.0(transitive)
+ Addedeslint-plugin-react-hooks@4.6.2(transitive)
+ Addedeslint-utils@3.0.0(transitive)
+ Addedeslint-visitor-keys@2.1.0(transitive)
+ Addedespree@7.3.1(transitive)
+ Addedfast-glob@3.3.2(transitive)
+ Addedfast-uri@3.0.2(transitive)
+ Addedfastq@1.17.1(transitive)
+ Addedfile-entry-cache@6.0.1(transitive)
+ Addedfill-range@7.1.1(transitive)
+ Addedflat-cache@3.2.0(transitive)
+ Addedflatted@3.3.1(transitive)
+ Addedglobals@13.24.0(transitive)
+ Addedglobby@11.1.0(transitive)
+ Addedis-number@7.0.0(transitive)
+ Addedjson-buffer@3.0.1(transitive)
+ Addedjson-schema-traverse@1.0.0(transitive)
+ Addedkeyv@4.5.4(transitive)
+ Addedlevn@0.4.1(transitive)
+ Addedlodash.merge@4.6.2(transitive)
+ Addedlodash.truncate@4.4.2(transitive)
+ Addedmerge2@1.4.1(transitive)
+ Addedmicromatch@4.0.8(transitive)
+ Addedoptionator@0.9.4(transitive)
+ Addedpath-key@3.1.1(transitive)
+ Addedpath-type@4.0.0(transitive)
+ Addedpicomatch@2.3.1(transitive)
+ Addedprelude-ls@1.2.1(transitive)
+ Addedqueue-microtask@1.2.3(transitive)
+ Addedrequire-from-string@2.0.2(transitive)
+ Addedreusify@1.0.4(transitive)
+ Addedrimraf@3.0.2(transitive)
+ Addedrun-parallel@1.2.0(transitive)
+ Addedshebang-command@2.0.0(transitive)
+ Addedshebang-regex@3.0.0(transitive)
+ Addedslash@3.0.0(transitive)
+ Addedslice-ansi@4.0.0(transitive)
+ Addedstring-natural-compare@3.0.1(transitive)
+ Addedtable@6.8.2(transitive)
+ Addedto-regex-range@5.0.1(transitive)
+ Addedtype-check@0.4.0(transitive)
+ Addedtype-fest@0.20.2(transitive)
+ Addedwhich@2.0.2(transitive)
- Removed@babel/code-frame@7.24.7(transitive)
- Removed@types/eslint-visitor-keys@1.0.0(transitive)
- Removed@typescript-eslint/eslint-plugin@2.34.0(transitive)
- Removed@typescript-eslint/experimental-utils@2.34.0(transitive)
- Removed@typescript-eslint/parser@2.34.0(transitive)
- Removed@typescript-eslint/typescript-estree@2.34.0(transitive)
- Removedansi-escapes@4.3.2(transitive)
- Removedansi-regex@4.1.1(transitive)
- Removedastral-regex@1.0.0(transitive)
- Removedchardet@0.7.0(transitive)
- Removedcli-cursor@3.1.0(transitive)
- Removedcli-width@3.0.0(transitive)
- Removedcross-spawn@6.0.5(transitive)
- Removedemoji-regex@7.0.3(transitive)
- Removedeslint@6.8.0(transitive)
- Removedeslint-plugin-flowtype@4.7.0(transitive)
- Removedeslint-plugin-jest@23.20.0(transitive)
- Removedeslint-plugin-react-hooks@2.5.1(transitive)
- Removedeslint-utils@1.4.3(transitive)
- Removedespree@6.2.1(transitive)
- Removedexternal-editor@3.1.0(transitive)
- Removedfigures@3.2.0(transitive)
- Removedfile-entry-cache@5.0.1(transitive)
- Removedflat-cache@2.0.1(transitive)
- Removedflatted@2.0.2(transitive)
- Removedglobals@12.4.0(transitive)
- Removediconv-lite@0.4.24(transitive)
- Removedinquirer@7.3.3(transitive)
- Removedis-fullwidth-code-point@2.0.0(transitive)
- Removedlevn@0.3.0(transitive)
- Removedmimic-fn@2.1.0(transitive)
- Removedmkdirp@0.5.6(transitive)
- Removedmute-stream@0.0.8(transitive)
- Removednice-try@1.0.5(transitive)
- Removedonetime@5.1.2(transitive)
- Removedoptionator@0.8.3(transitive)
- Removedos-tmpdir@1.0.2(transitive)
- Removedpath-key@2.0.1(transitive)
- Removedprelude-ls@1.1.2(transitive)
- Removedregexpp@2.0.1(transitive)
- Removedrestore-cursor@3.1.0(transitive)
- Removedrimraf@2.6.3(transitive)
- Removedrun-async@2.4.1(transitive)
- Removedrxjs@6.6.7(transitive)
- Removedsafer-buffer@2.1.2(transitive)
- Removedshebang-command@1.2.0(transitive)
- Removedshebang-regex@1.0.0(transitive)
- Removedsignal-exit@3.0.7(transitive)
- Removedslice-ansi@2.1.0(transitive)
- Removedstring-width@3.1.0(transitive)
- Removedstrip-ansi@5.2.0(transitive)
- Removedtable@5.4.6(transitive)
- Removedthrough@2.3.8(transitive)
- Removedtmp@0.0.33(transitive)
- Removedtype-check@0.3.2(transitive)
- Removedtype-fest@0.21.3(transitive)
- Removedwhich@1.3.1(transitive)
- Removedwrite@1.0.3(transitive)
Updatedeslint-plugin-jest@^24.0.0