@bigcommerce/eslint-config 2.9.0 → 2.9.1
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/configs/prettier.js +5 -14
- package/package.json +8 -8
package/configs/prettier.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
const
|
|
2
|
-
const { resolveConfigFile } = require('prettier');
|
|
1
|
+
const path = require('path');
|
|
3
2
|
|
|
4
3
|
const defaultConfig = require('../prettier.config');
|
|
5
4
|
|
|
6
5
|
function getRules() {
|
|
7
|
-
const
|
|
8
|
-
|
|
6
|
+
const pkgPath = path.resolve(process.cwd(), 'package.json');
|
|
7
|
+
// eslint-disable-next-line import/no-dynamic-require
|
|
8
|
+
const pkg = require(pkgPath);
|
|
9
9
|
|
|
10
|
-
if (
|
|
10
|
+
if (pkg.prettier !== '@bigcommerce/eslint-config/prettier') {
|
|
11
11
|
throw new Error(`
|
|
12
12
|
=================================================================================
|
|
13
13
|
Please add "prettier": "@bigcommerce/eslint-config/prettier" to your package.json
|
|
@@ -15,15 +15,6 @@ function getRules() {
|
|
|
15
15
|
`);
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
if (basename(prettierConfigFile) !== 'package.json') {
|
|
19
|
-
throw new Error(`
|
|
20
|
-
=================================================================================
|
|
21
|
-
Please add "prettier": "@bigcommerce/eslint-config/prettier" to your package.json
|
|
22
|
-
and remove any other prettier config file
|
|
23
|
-
=================================================================================
|
|
24
|
-
`);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
18
|
return {
|
|
28
19
|
curly: ['error', 'all'],
|
|
29
20
|
'prettier/prettier': ['warn', defaultConfig, { usePrettierrc: false }],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigcommerce/eslint-config",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.1",
|
|
4
4
|
"description": "Default ESLint configuration used at BigCommerce",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"files": [
|
|
@@ -20,24 +20,24 @@
|
|
|
20
20
|
"directory": "packages/eslint-config"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@bigcommerce/eslint-plugin": "^1.3.
|
|
23
|
+
"@bigcommerce/eslint-plugin": "^1.3.1",
|
|
24
24
|
"@rushstack/eslint-patch": "^1.1.3",
|
|
25
25
|
"@stylistic/eslint-plugin": "^2.1.0",
|
|
26
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
27
|
-
"@typescript-eslint/parser": "^
|
|
26
|
+
"@typescript-eslint/eslint-plugin": "^8.4.0",
|
|
27
|
+
"@typescript-eslint/parser": "^8.4.0",
|
|
28
28
|
"eslint-config-prettier": "^9.1.0",
|
|
29
29
|
"eslint-import-resolver-typescript": "^3.5.2",
|
|
30
30
|
"eslint-plugin-gettext": "^1.2.0",
|
|
31
31
|
"eslint-plugin-import": "^2.26.0",
|
|
32
32
|
"eslint-plugin-jest": "^28.4.0",
|
|
33
33
|
"eslint-plugin-jest-formatting": "^3.1.0",
|
|
34
|
-
"eslint-plugin-jsdoc": "^
|
|
34
|
+
"eslint-plugin-jsdoc": "^50.2.2",
|
|
35
35
|
"eslint-plugin-jsx-a11y": "^6.5.1",
|
|
36
|
-
"eslint-plugin-prettier": "^
|
|
36
|
+
"eslint-plugin-prettier": "^5.2.1",
|
|
37
37
|
"eslint-plugin-react": "^7.29.4",
|
|
38
38
|
"eslint-plugin-react-hooks": "^4.5.0",
|
|
39
39
|
"eslint-plugin-switch-case": "^1.1.2",
|
|
40
|
-
"prettier": "^
|
|
40
|
+
"prettier": "^3.3.3"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"react": "^18.3.1"
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"optional": true
|
|
52
52
|
}
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "73ecca900b0e7c1459b1cc4089465d4b49cacc3c"
|
|
55
55
|
}
|