newspack-scripts 1.2.0 → 1.3.0
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/README.md +8 -0
- package/config/eslintrc.js +32 -0
- package/package.json +8 -1
package/README.md
CHANGED
|
@@ -10,3 +10,11 @@ Will run `jest` tests. Useful flags:
|
|
|
10
10
|
|
|
11
11
|
- `--watch` to run in file watch mode,
|
|
12
12
|
- `--coverage` to collect test coverage
|
|
13
|
+
|
|
14
|
+
### build
|
|
15
|
+
|
|
16
|
+
Will run `calypso-build`, creating optimised production builds.
|
|
17
|
+
|
|
18
|
+
### start
|
|
19
|
+
|
|
20
|
+
Will run `calypso-build` in watch mode.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
extends: [
|
|
3
|
+
"plugin:@wordpress/eslint-plugin/recommended",
|
|
4
|
+
"plugin:react/recommended",
|
|
5
|
+
"plugin:import/errors",
|
|
6
|
+
"plugin:import/warnings",
|
|
7
|
+
],
|
|
8
|
+
env: {
|
|
9
|
+
browser: true,
|
|
10
|
+
jest: true,
|
|
11
|
+
},
|
|
12
|
+
ignorePatterns: ["dist/", "node_modules/"],
|
|
13
|
+
parser: "@babel/eslint-parser",
|
|
14
|
+
rules: {
|
|
15
|
+
"no-console": "off",
|
|
16
|
+
camelcase: "off",
|
|
17
|
+
// Disallow importing or requiring packages that are not listed in package.json
|
|
18
|
+
// This prevents us from depending on transitive dependencies, which could break in unexpected ways.
|
|
19
|
+
"import/no-extraneous-dependencies": ["error", { packageDir: "." }],
|
|
20
|
+
// There's a conflict with prettier here:
|
|
21
|
+
"react/jsx-curly-spacing": "off",
|
|
22
|
+
// Skip prop types validation for now
|
|
23
|
+
"react/prop-types": "off",
|
|
24
|
+
"react/react-in-jsx-scope": "off",
|
|
25
|
+
"react/self-closing-comp": "error",
|
|
26
|
+
// JSDoc rules overrides
|
|
27
|
+
"jsdoc/require-returns": "off",
|
|
28
|
+
"jsdoc/require-param": "off",
|
|
29
|
+
// Deprecated rules
|
|
30
|
+
"jsx-a11y/no-onchange": "off",
|
|
31
|
+
},
|
|
32
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "newspack-scripts",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"bin": {
|
|
6
6
|
"newspack-scripts": "./bin/newspack-scripts.js"
|
|
@@ -9,12 +9,19 @@
|
|
|
9
9
|
"license": "ISC",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@automattic/calypso-build": "^10.0.0",
|
|
12
|
+
"@babel/eslint-parser": "^7.16.3",
|
|
12
13
|
"@babel/preset-env": "^7.16.4",
|
|
13
14
|
"@testing-library/jest-dom": "^5.15.1",
|
|
14
15
|
"@testing-library/react": "^12.1.2",
|
|
16
|
+
"@wordpress/eslint-plugin": "^9.3.0",
|
|
15
17
|
"autoprefixer": "^10.4.0",
|
|
16
18
|
"babel-jest": "^27.4.2",
|
|
17
19
|
"cross-spawn": "^7.0.3",
|
|
20
|
+
"eslint": "^7.32.0",
|
|
21
|
+
"eslint-config-prettier": "^8.3.0",
|
|
22
|
+
"eslint-plugin-import": "^2.25.3",
|
|
23
|
+
"eslint-plugin-jest": "^25.3.0",
|
|
24
|
+
"eslint-plugin-react": "^7.27.1",
|
|
18
25
|
"jest": "^27.4.3",
|
|
19
26
|
"jest-environment-jsdom": "^27.4.3",
|
|
20
27
|
"postcss": "^8.4.4",
|