-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: turning on
jest/require-tothrow-message
(#10)
- Loading branch information
Showing
6 changed files
with
93 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "./index.js" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"printWidth": 120, | ||
"singleQuote": true, | ||
"trailingComma": "es5" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1,65 @@ | ||
module.exports = { | ||
extends: [ | ||
"airbnb-base", | ||
"eslint:recommended", | ||
"plugin:eslint-comments/recommended", | ||
"plugin:import/errors", | ||
"plugin:import/warnings", | ||
"plugin:sonarjs/recommended", | ||
"prettier" | ||
'airbnb-base', | ||
'eslint:recommended', | ||
'plugin:eslint-comments/recommended', | ||
'plugin:import/errors', | ||
'plugin:import/warnings', | ||
'plugin:sonarjs/recommended', | ||
'prettier', | ||
], | ||
plugins: ["node", "prettier", "unicorn"], | ||
plugins: ['node', 'prettier', 'unicorn'], | ||
rules: { | ||
"arrow-body-style": "off", | ||
'arrow-body-style': 'off', | ||
|
||
"eslint-comments/disable-enable-pair": ["error", { allowWholeFile: true }], | ||
"eslint-comments/no-unused-disable": "error", | ||
'eslint-comments/disable-enable-pair': ['error', { allowWholeFile: true }], | ||
'eslint-comments/no-unused-disable': 'error', | ||
|
||
"func-names": "off", | ||
'func-names': 'off', | ||
|
||
"import/default": "off", | ||
"import/named": "off", // @fixme Disabling this for now, but there are some weird callouts with it. | ||
"import/order": "off", | ||
'import/default': 'off', | ||
'import/named': 'off', // @fixme Disabling this for now, but there are some weird callouts with it. | ||
'import/order': 'off', | ||
|
||
"no-constructor-return": "error", | ||
"no-dupe-else-if": "error", | ||
"no-else-return": ["error", { allowElseIf: true }], | ||
'no-constructor-return': 'error', | ||
'no-dupe-else-if': 'error', | ||
'no-else-return': ['error', { allowElseIf: true }], | ||
|
||
// Disallow shadowing of any variable that isn't "err" as this is a common case that is acceptable. | ||
"no-shadow": ["error", { allow: ["err"] }], | ||
'no-shadow': ['error', { allow: ['err'] }], | ||
|
||
"node/no-deprecated-api": "error", | ||
"node/no-exports-assign": "error", | ||
"node/no-extraneous-require": "error", | ||
'node/no-deprecated-api': 'error', | ||
'node/no-exports-assign': 'error', | ||
'node/no-extraneous-require': 'error', | ||
|
||
"prefer-destructuring": "off", | ||
'prefer-destructuring': 'off', | ||
|
||
"prettier/prettier": "error", | ||
'prettier/prettier': 'error', | ||
|
||
"sonarjs/cognitive-complexity": "off", | ||
"sonarjs/no-collapsible-if": "off", | ||
"sonarjs/no-duplicate-string": "off", | ||
"sonarjs/no-duplicated-branches": "off", | ||
"sonarjs/no-identical-functions": "off", // @todo We should fix these. | ||
"sonarjs/prefer-immediate-return": "off", // @todo We should fix these. | ||
'sonarjs/cognitive-complexity': 'off', | ||
'sonarjs/no-collapsible-if': 'off', | ||
'sonarjs/no-duplicate-string': 'off', | ||
'sonarjs/no-duplicated-branches': 'off', | ||
'sonarjs/no-identical-functions': 'off', // @todo We should fix these. | ||
'sonarjs/prefer-immediate-return': 'off', // @todo We should fix these. | ||
|
||
"unicorn/catch-error-name": [ | ||
"error", | ||
{ caughtErrorsIgnorePattern: "^(error|err|e)$" } | ||
], | ||
'unicorn/catch-error-name': ['error', { caughtErrorsIgnorePattern: '^(error|err|e)$' }], | ||
// "unicorn/consistent-function-scoping": "error", // Maybe? | ||
"unicorn/custom-error-definition": "error", | ||
"unicorn/error-message": "error", | ||
"unicorn/escape-case": "error", | ||
"unicorn/new-for-builtins": "error", | ||
"unicorn/no-array-instanceof": "error", | ||
'unicorn/custom-error-definition': 'error', | ||
'unicorn/error-message': 'error', | ||
'unicorn/escape-case': 'error', | ||
'unicorn/new-for-builtins': 'error', | ||
'unicorn/no-array-instanceof': 'error', | ||
// "unicorn/no-for-loop": "error", // Maybe? | ||
"no-nested-ternary": "off", // Disabled in favor of `unicorn/no-nested-ternary` which has better nesting detection. | ||
"unicorn/no-nested-ternary": "error", | ||
"unicorn/no-unreadable-array-destructuring": "error", | ||
'no-nested-ternary': 'off', // Disabled in favor of `unicorn/no-nested-ternary` which has better nesting detection. | ||
'unicorn/no-nested-ternary': 'error', | ||
'unicorn/no-unreadable-array-destructuring': 'error', | ||
// "unicorn/no-unsafe-regex": "error", // @todo We should resolve these. | ||
"unicorn/no-unused-properties": "error", | ||
'unicorn/no-unused-properties': 'error', | ||
// "unicorn/prefer-includes": "error", // Maybe? | ||
// "unicorn/prefer-query-selector": "error", // Maybe? | ||
"unicorn/prefer-starts-ends-with": "off", // @todo We should resolve these. | ||
"unicorn/prefer-type-error": "error", | ||
"unicorn/throw-new-error": "error" | ||
} | ||
'unicorn/prefer-starts-ends-with': 'off', // @todo We should resolve these. | ||
'unicorn/prefer-type-error': 'error', | ||
'unicorn/throw-new-error': 'error', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,8 +47,5 @@ | |
"extends": [ | ||
"@commitlint/config-conventional" | ||
] | ||
}, | ||
"eslintConfig": { | ||
"extends": "./index.js" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,40 @@ | ||
module.exports = { | ||
extends: ["plugin:jsx-a11y/recommended", "plugin:react/recommended"], | ||
extends: ['plugin:jsx-a11y/recommended', 'plugin:react/recommended'], | ||
env: { | ||
browser: true | ||
browser: true, | ||
}, | ||
settings: { | ||
"import/resolver": { | ||
'import/resolver': { | ||
node: { | ||
extensions: [".js", ".jsx"] | ||
} | ||
extensions: ['.js', '.jsx'], | ||
}, | ||
}, | ||
react: { | ||
version: "detect" | ||
} | ||
version: 'detect', | ||
}, | ||
}, | ||
rules: { | ||
"jsx-a11y/no-onchange": "off", // @todo We should fix these. | ||
'jsx-a11y/no-onchange': 'off', // @todo We should fix these. | ||
|
||
"no-param-reassign": ["error", { props: false }], | ||
'no-param-reassign': ['error', { props: false }], | ||
|
||
"react/destructuring-assignment": "off", | ||
"react/jsx-props-no-spreading": [ | ||
"error", | ||
'react/destructuring-assignment': 'off', | ||
'react/jsx-props-no-spreading': [ | ||
'error', | ||
{ | ||
html: "enforce", | ||
custom: "ignore" | ||
} | ||
html: 'enforce', | ||
custom: 'ignore', | ||
}, | ||
], | ||
|
||
"react/jsx-sort-default-props": ["error", { ignoreCase: true }], | ||
"react/jsx-sort-props": [ | ||
"error", | ||
{ ignoreCase: true, reservedFirst: true } | ||
], | ||
"react/sort-prop-types": [ | ||
"error", | ||
'react/jsx-sort-default-props': ['error', { ignoreCase: true }], | ||
'react/jsx-sort-props': ['error', { ignoreCase: true, reservedFirst: true }], | ||
'react/sort-prop-types': [ | ||
'error', | ||
{ | ||
ignoreCase: true, | ||
sortShapeProp: true | ||
} | ||
] | ||
} | ||
sortShapeProp: true, | ||
}, | ||
], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,25 @@ | ||
module.exports = { | ||
extends: ["plugin:jest/recommended", "plugin:jest/style"], | ||
plugins: ["jest"], | ||
extends: ['plugin:jest/recommended', 'plugin:jest/style'], | ||
plugins: ['jest'], | ||
env: { | ||
"jest/globals": true | ||
'jest/globals': true, | ||
}, | ||
rules: { | ||
"jest/consistent-test-it": "warn", | ||
"jest/expect-expect": "warn", | ||
"jest/no-disabled-tests": "off", | ||
"jest/no-duplicate-hooks": "warn", | ||
"jest/no-expect-resolves": "warn", | ||
"jest/no-if": "error", | ||
"jest/prefer-hooks-on-top": "warn", | ||
"jest/prefer-strict-equal": "error", | ||
"jest/valid-describe": "error", | ||
"jest/valid-title": "warn", | ||
'jest/consistent-test-it': 'warn', | ||
'jest/expect-expect': 'warn', | ||
'jest/no-disabled-tests': 'off', | ||
'jest/no-duplicate-hooks': 'warn', | ||
'jest/no-expect-resolves': 'warn', | ||
'jest/no-if': 'error', | ||
'jest/prefer-hooks-on-top': 'warn', | ||
'jest/prefer-strict-equal': 'error', | ||
'jest/require-tothrow-message': 'error', | ||
'jest/valid-describe': 'error', | ||
'jest/valid-title': 'warn', | ||
|
||
"import/no-extraneous-dependencies": "off", | ||
"node/no-extraneous-require": "off", | ||
'import/no-extraneous-dependencies': 'off', | ||
'node/no-extraneous-require': 'off', | ||
|
||
"sonarjs/no-identical-functions": "off" | ||
} | ||
'sonarjs/no-identical-functions': 'off', | ||
}, | ||
}; |