Skip to content

Commit af45ea2

Browse files
committed
[Publish] feat: Update packages, add eslint peer dependency
BREAKING CHANGE: [email protected] or higher is now a peer dependency Added rules: * [`react/no-find-dom-node`](https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-find-dom-node.md) * [`react/no-redundant-should-component-update`](https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-redundant-should-component-update.md) * [`getter-return`](http://eslint.org/docs/rules/getter-return) * [`multiline-ternary`](http://eslint.org/docs/rules/multiline-ternary) * [`object-curly-newline`](http://eslint.org/docs/rules/object-curly-newline) * [`semi-style`](http://eslint.org/docs/rules/semi-style) * [`switch-colon-spacing`](http://eslint.org/docs/rules/switch-colon-spacing) Added options: * * `{"ignoreComments": true}` for [`no-trailing-spaces`](http://eslint.org/docs/rules/no-trailing-spaces) * `{"newlines-between": "always-and-inside-groups"}` for [`import/order`](https://github.com/benmosher/eslint-plugin-import/blob/HEAD/docs/rules/order.md) [`react/jsx-curly-spacing`](https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-curly-spacing.md) is temporarily disabled until a [fix](jsx-eslint/eslint-plugin-react#1292) gets published
1 parent 87937cd commit af45ea2

File tree

4 files changed

+19
-9
lines changed

4 files changed

+19
-9
lines changed

base.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
module.exports = {
22
"rules": {
33
// Possible Errors
4+
"getter-return": 2,
45
"comma-dangle": [2, "never"],
56
"no-cond-assign": [2, "except-parens"],
67
"no-console": 2,
@@ -128,9 +129,9 @@ module.exports = {
128129
"ignorePattern": "\"(?=([^\"]|\\\"){40,}\")|'(?=([^']|\\'){40,}')"
129130
}],
130131
"max-nested-callbacks": 0, // useless, only function with name call
132+
"multiline-ternary": [2, "always-multiline"],
131133
"new-cap": 2,
132134
"new-parens": 2,
133-
"newline-after-var": 0,
134135
"no-array-constructor": 2,
135136
"no-continue": 0,
136137
"no-inline-comments": 0,
@@ -143,9 +144,10 @@ module.exports = {
143144
"no-restricted-syntax": 2,
144145
"no-spaced-func": 2,
145146
"no-ternary": 0,
146-
"no-trailing-spaces": 2,
147+
"no-trailing-spaces": [2, {"ignoreComments": true}],
147148
"no-underscore-dangle": 0,
148149
"no-unneeded-ternary": 2,
150+
"object-curly-newline": [2, {"consistent": true}],
149151
"object-curly-spacing": 2,
150152
"one-var": [2, "never"],
151153
"operator-assignment": [2, "always"],
@@ -156,13 +158,15 @@ module.exports = {
156158
"require-jsdoc": 0,
157159
"semi-spacing": [2, {"before": false, "after": true}],
158160
"semi": [2, "always"],
161+
"semi-style": [2, "last"],
159162
"sort-vars": 0,
160163
"space-before-blocks": [2, "always"],
161164
"space-before-function-paren": [2, {"anonymous": "always", "named": "never"}],
162165
"space-in-parens": [2, "never"],
163166
"space-infix-ops": 2,
164167
"space-unary-ops": [2, {"words": true, "nonwords": false}],
165168
"spaced-comment": 0,
169+
"switch-colon-spacing": [2, {"after": true, "before": false}],
166170
"wrap-regex": 0
167171
}
168172
};

es6.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ module.exports = {
3737
"import/first": 2,
3838
"import/no-duplicates": 2,
3939
"import/extensions": [2, "always", {"js": "never"}],
40-
"import/order": [2, {"newlines-between": "always"}],
40+
"import/order": [2, {"newlines-between": "always-and-inside-groups"}],
4141
"import/newline-after-import": 2,
4242
"import/no-named-default": 2
4343
}

package.json

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,21 @@
1919
"jetbrains"
2020
],
2121
"dependencies": {
22-
"eslint-import-resolver-webpack": "0.8.1",
23-
"eslint-plugin-angular": "1.0.1",
24-
"eslint-plugin-bdd": "2.1.0",
25-
"eslint-plugin-import": "2.2.0",
26-
"eslint-plugin-react": "7.0.1"
22+
"eslint-import-resolver-webpack": "^0.8.3",
23+
"eslint-plugin-angular": "^3.0.0",
24+
"eslint-plugin-bdd": "^2.1.1",
25+
"eslint-plugin-import": "^2.7.0",
26+
"eslint-plugin-react": "^7.1.0"
2727
},
2828
"devDependencies": {
2929
"ci-publish": "^1.3.0",
3030
"commitizen": "^2.9.6",
3131
"cz-conventional-changelog": "^2.0.0",
3232
"standard-version": "^4.0.0"
3333
},
34+
"peerDependencies": {
35+
"eslint": ">=4.2.0"
36+
},
3437
"config": {
3538
"commitizen": {
3639
"path": "cz-conventional-changelog"

react.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ module.exports = {
77
"react/forbid-prop-types": 0,
88
"react/jsx-boolean-value": [2, "always"],
99
"react/jsx-closing-bracket-location": [2, "tag-aligned"],
10-
"react/jsx-curly-spacing": [2, "never"],
10+
// turn back on when https://github.com/yannickcr/eslint-plugin-react/pull/1292 gets published
11+
"react/jsx-curly-spacing": [0, {"when": "never", "children": true}],
1112
"react/jsx-equals-spacing": [2, "never"],
1213
"react/jsx-first-prop-new-line": 2,
1314
"react/jsx-indent": [2, 2],
@@ -33,7 +34,9 @@ module.exports = {
3334
"react/no-did-mount-set-state": 2,
3435
"react/no-did-update-set-state": 2,
3536
"react/no-direct-mutation-state": 2,
37+
"react/no-find-dom-node": 2,
3638
"react/no-multi-comp": [2, { "ignoreStateless": true }],
39+
"react/no-redundant-should-component-update": 2,
3740
"react/no-set-state": 0,
3841
"react/no-string-refs": 2,
3942
"react/no-unknown-property": 2,

0 commit comments

Comments
 (0)