@petbee/eslint-config 1.0.4 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +7 -3
- package/rules/tests.js +0 -13
- package/rules/typescript.js +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@petbee/eslint-config",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"description": "Petbee's eslint config",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -21,12 +21,16 @@
|
|
|
21
21
|
"directory": "packages/eslint-config"
|
|
22
22
|
},
|
|
23
23
|
"scripts": {
|
|
24
|
+
"eslint-check": "eslint-config-prettier index.js",
|
|
25
|
+
"dump-config": "eslint-config-prettier index.js > config-dump.json",
|
|
24
26
|
"format": "prettier --ignore-path='.gitignore' --list-different --write .",
|
|
25
27
|
"format:check": "prettier --ignore-path='.gitignore' --check .",
|
|
26
28
|
"lint": "eslint --ignore-path='.gitignore' '{src,tests}/**/*.{ts,tsx}'"
|
|
27
29
|
},
|
|
28
30
|
"eslintConfig": {
|
|
29
|
-
"extends":
|
|
31
|
+
"extends": [
|
|
32
|
+
"petbee"
|
|
33
|
+
]
|
|
30
34
|
},
|
|
31
35
|
"prettier": "@petbee/prettier-config",
|
|
32
36
|
"bugs": {
|
|
@@ -60,5 +64,5 @@
|
|
|
60
64
|
"publishConfig": {
|
|
61
65
|
"access": "public"
|
|
62
66
|
},
|
|
63
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "6c64a0d62e02bb868a926eb0cdc56701b5d48daf"
|
|
64
68
|
}
|
package/rules/tests.js
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
// Jest:
|
|
2
2
|
// https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules
|
|
3
3
|
// Cypress: https://github.com/cypress-io/eslint-plugin-cypress/blob/master/docs/rules
|
|
4
|
-
const { hasPackage } = require('../lib/utils')
|
|
5
|
-
|
|
6
|
-
const hasJest = hasPackage('jest')
|
|
7
4
|
|
|
8
5
|
module.exports = {
|
|
9
6
|
overrides: [
|
|
@@ -24,16 +21,6 @@ module.exports = {
|
|
|
24
21
|
// Unless it's inside a cypress directory
|
|
25
22
|
excludedFiles: ['**/cypress/**'],
|
|
26
23
|
extends: ['plugin:jest/recommended', 'plugin:jest/style'],
|
|
27
|
-
settings: {
|
|
28
|
-
// need to explicitly set this for the IO apps.
|
|
29
|
-
// we need to explicitly define jest version because IO apps
|
|
30
|
-
// have jest installed in a subdirectory.
|
|
31
|
-
jest: {
|
|
32
|
-
...(hasJest === false && {
|
|
33
|
-
version: 26,
|
|
34
|
-
}),
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
24
|
rules: {
|
|
38
25
|
// Enforce consistent a test method name
|
|
39
26
|
// https://github.com/jest-community/eslint-plugin-jest/blob/master/docs/rules/consistent-test-it.md
|
package/rules/typescript.js
CHANGED
|
@@ -2,9 +2,8 @@ const { hasPackage } = require('../lib/utils')
|
|
|
2
2
|
|
|
3
3
|
const hasTypescript = hasPackage('typescript')
|
|
4
4
|
|
|
5
|
-
module.exports =
|
|
6
|
-
? {
|
|
7
|
-
: {
|
|
5
|
+
module.exports = hasTypescript
|
|
6
|
+
? {
|
|
8
7
|
overrides: [
|
|
9
8
|
{
|
|
10
9
|
files: ['*.ts', '*.tsx'],
|
|
@@ -284,3 +283,4 @@ module.exports = !hasTypescript
|
|
|
284
283
|
},
|
|
285
284
|
],
|
|
286
285
|
}
|
|
286
|
+
: {}
|