@wistia/eslint-config 0.27.0 → 0.29.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wistia/eslint-config",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.0",
|
|
4
4
|
"packageManager": "yarn@4.0.2",
|
|
5
5
|
"description": "Wistia's ESLint configurations",
|
|
6
6
|
"main": "react.js",
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"./package.json": "./package.json",
|
|
13
13
|
".": "./configs/eslint/default.cjs",
|
|
14
14
|
"./cypress": "./configs/eslint/cypress.cjs",
|
|
15
|
+
"./functional-programming": "./configs/eslint/functional-programming.cjs",
|
|
15
16
|
"./jest": "./configs/eslint/jest.cjs",
|
|
16
17
|
"./jsdoc": "./configs/eslint/jsdoc.cjs",
|
|
17
18
|
"./node": "./configs/eslint/node.cjs",
|
|
@@ -37,31 +38,32 @@
|
|
|
37
38
|
"test:stylelint": "stylelint --print-config ./test/index.mjs"
|
|
38
39
|
},
|
|
39
40
|
"dependencies": {
|
|
40
|
-
"@babel/core": "^7.23.
|
|
41
|
+
"@babel/core": "^7.23.7",
|
|
41
42
|
"@babel/eslint-parser": "^7.23.3",
|
|
42
43
|
"@babel/preset-react": "^7.23.3",
|
|
43
|
-
"@rushstack/eslint-patch": "^1.6.
|
|
44
|
-
"@testing-library/dom": "^9.3.
|
|
45
|
-
"@typescript-eslint/eslint-plugin": "^6.
|
|
46
|
-
"@typescript-eslint/parser": "^6.
|
|
44
|
+
"@rushstack/eslint-patch": "^1.6.1",
|
|
45
|
+
"@testing-library/dom": "^9.3.4",
|
|
46
|
+
"@typescript-eslint/eslint-plugin": "^6.18.1",
|
|
47
|
+
"@typescript-eslint/parser": "^6.18.1",
|
|
47
48
|
"confusing-browser-globals": "^1.0.11",
|
|
48
|
-
"eslint": "^8.
|
|
49
|
+
"eslint": "^8.56.0",
|
|
49
50
|
"eslint-config-prettier": "^9.1.0",
|
|
50
51
|
"eslint-import-resolver-typescript": "^3.6.1",
|
|
51
52
|
"eslint-plugin-better-styled-components": "^1.1.2",
|
|
52
53
|
"eslint-plugin-cypress": "^2.15.1",
|
|
53
54
|
"eslint-plugin-filenames": "^1.3.2",
|
|
54
|
-
"eslint-plugin-
|
|
55
|
-
"eslint-plugin-
|
|
55
|
+
"eslint-plugin-fp": "^2.3.0",
|
|
56
|
+
"eslint-plugin-import": "^2.29.1",
|
|
57
|
+
"eslint-plugin-jest": "^27.6.2",
|
|
56
58
|
"eslint-plugin-jest-dom": "^5.1.0",
|
|
57
59
|
"eslint-plugin-jest-formatting": "^3.1.0",
|
|
58
|
-
"eslint-plugin-jsdoc": "^
|
|
60
|
+
"eslint-plugin-jsdoc": "^48.0.2",
|
|
59
61
|
"eslint-plugin-jsx-a11y": "^6.8.0",
|
|
60
62
|
"eslint-plugin-no-only-tests": "^3.1.0",
|
|
61
63
|
"eslint-plugin-no-snapshot-testing": "^1.0.61",
|
|
62
64
|
"eslint-plugin-node": "^11.1.0",
|
|
63
65
|
"eslint-plugin-observers": "^1.0.1",
|
|
64
|
-
"eslint-plugin-prettier": "^5.
|
|
66
|
+
"eslint-plugin-prettier": "^5.1.3",
|
|
65
67
|
"eslint-plugin-promise": "^6.1.1",
|
|
66
68
|
"eslint-plugin-react": "^7.33.2",
|
|
67
69
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
@@ -69,22 +71,22 @@
|
|
|
69
71
|
"eslint-plugin-storybook": "^0.6.15",
|
|
70
72
|
"eslint-plugin-styled-components-a11y": "^2.1.31",
|
|
71
73
|
"eslint-plugin-testing-library": "^6.2.0",
|
|
72
|
-
"postcss": "^8.4.
|
|
74
|
+
"postcss": "^8.4.33",
|
|
73
75
|
"postcss-scss": "^4.0.9",
|
|
74
|
-
"postcss-styled-syntax": "^0.
|
|
76
|
+
"postcss-styled-syntax": "^0.6.4",
|
|
75
77
|
"prettier": "^3.1.1",
|
|
76
|
-
"stylelint": "^16.0
|
|
77
|
-
"stylelint-declaration-block-no-ignored-properties": "^2.
|
|
78
|
+
"stylelint": "^16.1.0",
|
|
79
|
+
"stylelint-declaration-block-no-ignored-properties": "^2.8.0",
|
|
78
80
|
"stylelint-prettier": "^5.0.0",
|
|
79
81
|
"stylelint-scss": "^6.0.0"
|
|
80
82
|
},
|
|
81
83
|
"devDependencies": {
|
|
82
|
-
"@commitlint/cli": "^18.4.
|
|
83
|
-
"@commitlint/config-conventional": "^18.4.
|
|
84
|
+
"@commitlint/cli": "^18.4.4",
|
|
85
|
+
"@commitlint/config-conventional": "^18.4.4",
|
|
84
86
|
"check-export-map": "^1.3.1",
|
|
85
87
|
"husky": "^8.0.3",
|
|
86
88
|
"typescript": "^5.3.3",
|
|
87
|
-
"vitest": "^1.
|
|
89
|
+
"vitest": "^1.1.3"
|
|
88
90
|
},
|
|
89
91
|
"engines": {
|
|
90
92
|
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
// only add rules related to functional programming
|
|
2
|
+
// see: https://github.com/jfmengels/eslint-plugin-fp
|
|
3
|
+
|
|
4
|
+
module.exports = {
|
|
5
|
+
plugins: ['eslint-plugin-fp'],
|
|
6
|
+
|
|
7
|
+
rules: {
|
|
8
|
+
// Match Exported Values
|
|
9
|
+
// https://github.com/selaux/eslint-plugin-filenames#matching-exported-values-match-exported
|
|
10
|
+
'filenames/match-exported': 'error',
|
|
11
|
+
|
|
12
|
+
// Forbid the use of arguments.
|
|
13
|
+
// https://github.com/jfmengels/eslint-plugin-fp/blob/master/docs/rules/no-arguments.md
|
|
14
|
+
'fp/no-arguments': 'error',
|
|
15
|
+
|
|
16
|
+
// Forbid the use of class.
|
|
17
|
+
// https://github.com/jfmengels/eslint-plugin-fp/blob/master/docs/rules/no-class.md
|
|
18
|
+
'fp/no-class': 'error',
|
|
19
|
+
|
|
20
|
+
// Forbid the use of delete.
|
|
21
|
+
// https://github.com/jfmengels/eslint-plugin-fp/blob/master/docs/rules/no-delete.md
|
|
22
|
+
'fp/no-delete': 'error',
|
|
23
|
+
|
|
24
|
+
// Forbid the use of the events module.
|
|
25
|
+
// https://github.com/jfmengels/eslint-plugin-fp/blob/master/docs/rules/no-events.md
|
|
26
|
+
'fp/no-events': 'error',
|
|
27
|
+
|
|
28
|
+
// Forbid the use of getters and setters.
|
|
29
|
+
// https://github.com/jfmengels/eslint-plugin-fp/blob/master/docs/rules/no-get-set.md
|
|
30
|
+
'fp/no-get-set': 'error',
|
|
31
|
+
|
|
32
|
+
// Forbid the use of let.
|
|
33
|
+
// https://github.com/jfmengels/eslint-plugin-fp/blob/master/docs/rules/no-let.md
|
|
34
|
+
'fp/no-let': 'error',
|
|
35
|
+
|
|
36
|
+
// Forbid the use of loops.
|
|
37
|
+
// https://github.com/jfmengels/eslint-plugin-fp/blob/master/docs/rules/no-loops.md
|
|
38
|
+
'fp/no-loops': 'error',
|
|
39
|
+
|
|
40
|
+
// Forbid the use of Object.assign() with a variable as first argument.
|
|
41
|
+
// https://github.com/jfmengels/eslint-plugin-fp/blob/master/docs/rules/no-mutating-assign.md
|
|
42
|
+
'fp/no-mutating-assign': 'error',
|
|
43
|
+
|
|
44
|
+
// Forbid the use of mutating methods.
|
|
45
|
+
// https://github.com/jfmengels/eslint-plugin-fp/blob/master/docs/rules/no-mutating-methods.md
|
|
46
|
+
'fp/no-mutating-methods': 'error',
|
|
47
|
+
|
|
48
|
+
// Forbid the use of mutating operators.
|
|
49
|
+
// https://github.com/jfmengels/eslint-plugin-fp/blob/master/docs/rules/no-mutation.md
|
|
50
|
+
'fp/no-mutation': 'error',
|
|
51
|
+
|
|
52
|
+
// Forbid the use of null and undefined.
|
|
53
|
+
// https://github.com/jfmengels/eslint-plugin-fp/blob/master/docs/rules/no-nil.md
|
|
54
|
+
'fp/no-nil': 'error',
|
|
55
|
+
|
|
56
|
+
// Forbid the use of Proxy.
|
|
57
|
+
// https://github.com/jfmengels/eslint-plugin-fp/blob/master/docs/rules/no-proxy.md
|
|
58
|
+
'fp/no-proxy': 'error',
|
|
59
|
+
|
|
60
|
+
// Forbid the use of rest parameters.
|
|
61
|
+
// https://github.com/jfmengels/eslint-plugin-fp/blob/master/docs/rules/no-rest-parameters.md
|
|
62
|
+
'fp/no-rest-parameters': 'error',
|
|
63
|
+
|
|
64
|
+
// Forbid the use of this.
|
|
65
|
+
// https://github.com/jfmengels/eslint-plugin-fp/blob/master/docs/rules/no-this.md
|
|
66
|
+
'fp/no-this': 'error',
|
|
67
|
+
|
|
68
|
+
// Forbid the use of throw.
|
|
69
|
+
// https://github.com/jfmengels/eslint-plugin-fp/blob/master/docs/rules/no-throw.md
|
|
70
|
+
'fp/no-throw': 'error',
|
|
71
|
+
|
|
72
|
+
// Enforce that an expression gets used.
|
|
73
|
+
// https://github.com/jfmengels/eslint-plugin-fp/blob/master/docs/rules/no-unused-expression.md
|
|
74
|
+
'fp/no-unused-expression': 'error',
|
|
75
|
+
|
|
76
|
+
// Forbid the creation of valueOf fields.
|
|
77
|
+
// https://github.com/jfmengels/eslint-plugin-fp/blob/master/docs/rules/no-valueof-field.md
|
|
78
|
+
'fp/no-valueof-field': 'error',
|
|
79
|
+
},
|
|
80
|
+
};
|
|
@@ -4,15 +4,20 @@ module.exports = {
|
|
|
4
4
|
plugins: ['@typescript-eslint'],
|
|
5
5
|
|
|
6
6
|
rules: {
|
|
7
|
-
// Enforce a defaultProps definition for every prop that is not a required prop
|
|
8
|
-
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/require-default-props.md
|
|
9
7
|
// decision: default prop types shouldn't be necessary for optional parameters as they can just default to undefined
|
|
10
8
|
'react/require-default-props': 'off',
|
|
11
9
|
|
|
12
|
-
// Disallow JSX props spreading
|
|
13
|
-
// https://github.com/jsx-eslint/eslint-plugin-react/blob/master/docs/rules/jsx-props-no-spreading.md
|
|
14
10
|
// decision: because we have type safety in TypeScript, this rule isn't necessary as we will see
|
|
15
11
|
// TS errors for prop spreading against mismatched (prop)type declarations
|
|
16
12
|
'react/jsx-props-no-spreading': 'off',
|
|
13
|
+
|
|
14
|
+
// decision: TypeScript requires our props to be defined in a type or interface, so we do not need
|
|
15
|
+
// to have any rules regarding prop-types
|
|
16
|
+
'react/prop-types': 'off',
|
|
17
|
+
'react/sort-prop-types': 'off',
|
|
18
|
+
'react/default-props-match-prop-types': 'off',
|
|
19
|
+
'react/forbid-foreign-prop-types': 'off',
|
|
20
|
+
'react/forbid-prop-types': 'off',
|
|
21
|
+
'react/no-unused-prop-types': 'off',
|
|
17
22
|
},
|
|
18
23
|
};
|