eslint-config-prettier 6.8.0 → 6.11.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/babel.js CHANGED
@@ -5,6 +5,6 @@ module.exports = {
5
5
  "babel/quotes": 0,
6
6
 
7
7
  "babel/object-curly-spacing": "off",
8
- "babel/semi": "off"
9
- }
8
+ "babel/semi": "off",
9
+ },
10
10
  };
package/bin/cli.js CHANGED
@@ -17,8 +17,8 @@ if (module === require.main) {
17
17
  "This tool checks whether an ESLint configuration contains rules that are",
18
18
  "unnecessary or conflict with Prettier. It’s supposed to be run like this:",
19
19
  "",
20
- " eslint --print-config path/to/main.js | eslint-config-prettier-check",
21
- " eslint --print-config test/index.js | eslint-config-prettier-check",
20
+ " npx eslint --print-config path/to/main.js | npx eslint-config-prettier-check",
21
+ " npx eslint --print-config test/index.js | npx eslint-config-prettier-check",
22
22
  "",
23
23
  "Exit codes:",
24
24
  "",
@@ -27,14 +27,14 @@ if (module === require.main) {
27
27
  "2: Conflicting rules found.",
28
28
  "",
29
29
  "For more information, see:",
30
- "https://github.com/prettier/eslint-config-prettier#cli-helper-tool"
30
+ "https://github.com/prettier/eslint-config-prettier#cli-helper-tool",
31
31
  ].join("\n")
32
32
  );
33
33
  process.exit(1);
34
34
  }
35
35
 
36
36
  getStdin()
37
- .then(string => {
37
+ .then((string) => {
38
38
  const result = processString(string);
39
39
  if (result.stderr) {
40
40
  console.error(result.stderr);
@@ -44,7 +44,7 @@ if (module === require.main) {
44
44
  }
45
45
  process.exit(result.code);
46
46
  })
47
- .catch(error => {
47
+ .catch((error) => {
48
48
  console.error("Unexpected error", error);
49
49
  process.exit(1);
50
50
  });
@@ -57,7 +57,7 @@ function processString(string) {
57
57
  } catch (error) {
58
58
  return {
59
59
  stderr: `Failed to parse JSON:\n${error.message}`,
60
- code: 1
60
+ code: 1,
61
61
  };
62
62
  }
63
63
 
@@ -69,7 +69,7 @@ function processString(string) {
69
69
  ) {
70
70
  return {
71
71
  stderr: `Expected a \`{"rules: {...}"}\` JSON object, but got:\n${string}`,
72
- code: 1
72
+ code: 1,
73
73
  };
74
74
  }
75
75
 
@@ -80,8 +80,8 @@ function processString(string) {
80
80
  Object.create(null),
81
81
  ...fs
82
82
  .readdirSync(path.join(__dirname, ".."))
83
- .filter(name => !name.startsWith(".") && name.endsWith(".js"))
84
- .map(ruleFileName => require(`../${ruleFileName}`).rules)
83
+ .filter((name) => !name.startsWith(".") && name.endsWith(".js"))
84
+ .map((ruleFileName) => require(`../${ruleFileName}`).rules)
85
85
  );
86
86
 
87
87
  const regularRules = filterRules(
@@ -98,7 +98,7 @@ function processString(string) {
98
98
  );
99
99
 
100
100
  const flaggedRules = Object.keys(config.rules)
101
- .map(ruleName => {
101
+ .map((ruleName) => {
102
102
  const value = config.rules[ruleName];
103
103
  const arrayValue = Array.isArray(value) ? value : [value];
104
104
  const level = arrayValue[0];
@@ -110,7 +110,7 @@ function processString(string) {
110
110
 
111
111
  const regularFlaggedRuleNames = filterRuleNames(
112
112
  flaggedRules,
113
- ruleName => ruleName in regularRules
113
+ (ruleName) => ruleName in regularRules
114
114
  );
115
115
  const optionsFlaggedRuleNames = filterRuleNames(
116
116
  flaggedRules,
@@ -119,7 +119,7 @@ function processString(string) {
119
119
  );
120
120
  const specialFlaggedRuleNames = filterRuleNames(
121
121
  flaggedRules,
122
- ruleName => ruleName in specialRules
122
+ (ruleName) => ruleName in specialRules
123
123
  );
124
124
 
125
125
  if (
@@ -138,52 +138,52 @@ function processString(string) {
138
138
  "However, the following rules are enabled but cannot be automatically checked. See:",
139
139
  SPECIAL_RULES_URL,
140
140
  "",
141
- printRuleNames(specialFlaggedRuleNames)
141
+ printRuleNames(specialFlaggedRuleNames),
142
142
  ].join("\n");
143
143
 
144
144
  return {
145
145
  stdout: message,
146
- code: 0
146
+ code: 0,
147
147
  };
148
148
  }
149
149
 
150
150
  const regularMessage = [
151
151
  "The following rules are unnecessary or might conflict with Prettier:",
152
152
  "",
153
- printRuleNames(regularFlaggedRuleNames)
153
+ printRuleNames(regularFlaggedRuleNames),
154
154
  ].join("\n");
155
155
 
156
156
  const optionsMessage = [
157
157
  "The following rules are enabled with options that might conflict with Prettier. See:",
158
158
  SPECIAL_RULES_URL,
159
159
  "",
160
- printRuleNames(optionsFlaggedRuleNames)
160
+ printRuleNames(optionsFlaggedRuleNames),
161
161
  ].join("\n");
162
162
 
163
163
  const specialMessage = [
164
164
  "The following rules are enabled but cannot be automatically checked. See:",
165
165
  SPECIAL_RULES_URL,
166
166
  "",
167
- printRuleNames(specialFlaggedRuleNames)
167
+ printRuleNames(specialFlaggedRuleNames),
168
168
  ].join("\n");
169
169
 
170
170
  const message = [
171
171
  regularFlaggedRuleNames.length === 0 ? null : regularMessage,
172
172
  optionsFlaggedRuleNames.length === 0 ? null : optionsMessage,
173
- specialFlaggedRuleNames.length === 0 ? null : specialMessage
173
+ specialFlaggedRuleNames.length === 0 ? null : specialMessage,
174
174
  ]
175
175
  .filter(Boolean)
176
176
  .join("\n\n");
177
177
 
178
178
  return {
179
179
  stdout: message,
180
- code: 2
180
+ code: 2,
181
181
  };
182
182
  }
183
183
 
184
184
  function filterRules(rules, fn) {
185
185
  return Object.keys(rules)
186
- .filter(ruleName => fn(ruleName, rules[ruleName]))
186
+ .filter((ruleName) => fn(ruleName, rules[ruleName]))
187
187
  .reduce((obj, ruleName) => {
188
188
  obj[ruleName] = true;
189
189
  return obj;
@@ -192,15 +192,15 @@ function filterRules(rules, fn) {
192
192
 
193
193
  function filterRuleNames(rules, fn) {
194
194
  return rules
195
- .filter(rule => fn(rule.ruleName, rule.options))
196
- .map(rule => rule.ruleName);
195
+ .filter((rule) => fn(rule.ruleName, rule.options))
196
+ .map((rule) => rule.ruleName);
197
197
  }
198
198
 
199
199
  function printRuleNames(ruleNames) {
200
200
  return ruleNames
201
201
  .slice()
202
202
  .sort()
203
- .map(ruleName => `- ${ruleName}`)
203
+ .map((ruleName) => `- ${ruleName}`)
204
204
  .join("\n");
205
205
  }
206
206
 
package/bin/validators.js CHANGED
@@ -50,5 +50,5 @@ module.exports = {
50
50
  // Enable when Prettier supports SVG: https://github.com/prettier/prettier/issues/5322
51
51
  // && firstOption.svg === "any"
52
52
  );
53
- }
53
+ },
54
54
  };
package/flowtype.js CHANGED
@@ -10,6 +10,6 @@ module.exports = {
10
10
  "flowtype/space-after-type-colon": "off",
11
11
  "flowtype/space-before-generic-bracket": "off",
12
12
  "flowtype/space-before-type-colon": "off",
13
- "flowtype/union-intersection-spacing": "off"
14
- }
13
+ "flowtype/union-intersection-spacing": "off",
14
+ },
15
15
  };
package/index.js CHANGED
@@ -89,7 +89,7 @@ module.exports = {
89
89
  "unicode-bom": "off",
90
90
  "wrap-iife": "off",
91
91
  "wrap-regex": "off",
92
- "yield-star-spacing": "off"
92
+ "yield-star-spacing": "off",
93
93
  },
94
94
  includeDeprecated && {
95
95
  // Deprecated since version 4.0.0.
@@ -97,7 +97,7 @@ module.exports = {
97
97
  "indent-legacy": "off",
98
98
  // Deprecated since version 3.3.0.
99
99
  // https://eslint.org/docs/rules/no-spaced-func
100
- "no-spaced-func": "off"
100
+ "no-spaced-func": "off",
101
101
  }
102
- )
102
+ ),
103
103
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-prettier",
3
- "version": "6.8.0",
3
+ "version": "6.11.0",
4
4
  "license": "MIT",
5
5
  "author": "Simon Lydell",
6
6
  "description": "Turns off all rules that are unnecessary or might conflict with Prettier.",
@@ -26,7 +26,8 @@
26
26
  ],
27
27
  "scripts": {
28
28
  "doctoc": "doctoc README.md && replace \"\\[\\[([\\w/-]+)\\](?:([^\\[\\]]+)\\[([\\w/-]+)\\])?\\]\" \"[\\$1\\$2\\$3]\" README.md",
29
- "test:lint": "eslint .",
29
+ "prettier": "prettier --write .",
30
+ "test:lint": "eslint . && prettier --check .",
30
31
  "test:lint-verify-fail": "eslint \"test-lint/*.{js,ts,vue}\" --config .eslintrc.base.js --format json",
31
32
  "test:lint-rules": "eslint index.js --config test-config/.eslintrc.js --format json",
32
33
  "test:deprecated": "eslint-find-rules --deprecated index.js",
@@ -39,26 +40,26 @@
39
40
  "get-stdin": "^6.0.0"
40
41
  },
41
42
  "devDependencies": {
42
- "@typescript-eslint/eslint-plugin": "2.13.0",
43
- "@typescript-eslint/parser": "2.13.0",
44
- "babel-eslint": "10.0.3",
45
- "cross-spawn": "6.0.5",
43
+ "@typescript-eslint/eslint-plugin": "2.29.0",
44
+ "@typescript-eslint/parser": "2.29.0",
45
+ "babel-eslint": "10.1.0",
46
+ "cross-spawn": "7.0.2",
46
47
  "doctoc": "1.4.0",
47
- "eslint": "6.6.0",
48
+ "eslint": "6.8.0",
48
49
  "eslint-config-google": "0.14.0",
49
50
  "eslint-find-rules": "3.4.0",
50
51
  "eslint-plugin-babel": "5.3.0",
51
- "eslint-plugin-flowtype": "4.5.2",
52
- "eslint-plugin-prettier": "3.1.2",
53
- "eslint-plugin-react": "7.17.0",
52
+ "eslint-plugin-flowtype": "4.7.0",
53
+ "eslint-plugin-prettier": "3.1.3",
54
+ "eslint-plugin-react": "7.19.0",
54
55
  "eslint-plugin-standard": "4.0.1",
55
- "eslint-plugin-unicorn": "15.0.1",
56
- "eslint-plugin-vue": "6.0.1",
57
- "jest": "24.9.0",
58
- "prettier": "1.19.1",
59
- "replace": "1.1.1",
60
- "rimraf": "3.0.0",
61
- "typescript": "3.7.4"
56
+ "eslint-plugin-unicorn": "18.0.1",
57
+ "eslint-plugin-vue": "6.2.2",
58
+ "jest": "25.4.0",
59
+ "prettier": "2.0.5",
60
+ "replace": "1.1.5",
61
+ "rimraf": "3.0.2",
62
+ "typescript": "3.7.5"
62
63
  },
63
64
  "peerDependencies": {
64
65
  "eslint": ">=3.14.1"
package/react.js CHANGED
@@ -18,12 +18,12 @@ module.exports = {
18
18
  "react/jsx-one-expression-per-line": "off",
19
19
  "react/jsx-props-no-multi-spaces": "off",
20
20
  "react/jsx-tag-spacing": "off",
21
- "react/jsx-wrap-multilines": "off"
21
+ "react/jsx-wrap-multilines": "off",
22
22
  },
23
23
  includeDeprecated && {
24
24
  // Deprecated since version 7.0.0.
25
25
  // https://github.com/yannickcr/eslint-plugin-react/blob/master/CHANGELOG.md#700---2017-05-06
26
- "react/jsx-space-before-closing": "off"
26
+ "react/jsx-space-before-closing": "off",
27
27
  }
28
- )
28
+ ),
29
29
  };
package/standard.js CHANGED
@@ -4,6 +4,6 @@ module.exports = {
4
4
  rules: {
5
5
  "standard/array-bracket-even-spacing": "off",
6
6
  "standard/computed-property-even-spacing": "off",
7
- "standard/object-curly-even-spacing": "off"
8
- }
7
+ "standard/object-curly-even-spacing": "off",
8
+ },
9
9
  };
package/unicorn.js CHANGED
@@ -3,6 +3,6 @@
3
3
  module.exports = {
4
4
  rules: {
5
5
  "unicorn/no-nested-ternary": "off",
6
- "unicorn/number-literal-case": "off"
7
- }
6
+ "unicorn/number-literal-case": "off",
7
+ },
8
8
  };
package/vue.js CHANGED
@@ -3,6 +3,7 @@
3
3
  module.exports = {
4
4
  rules: {
5
5
  "vue/html-self-closing": 0,
6
+ "vue/max-len": 0,
6
7
 
7
8
  "vue/array-bracket-spacing": "off",
8
9
  "vue/arrow-spacing": "off",
@@ -26,6 +27,6 @@ module.exports = {
26
27
  "vue/script-indent": "off",
27
28
  "vue/singleline-html-element-content-newline": "off",
28
29
  "vue/space-infix-ops": "off",
29
- "vue/space-unary-ops": "off"
30
- }
30
+ "vue/space-unary-ops": "off",
31
+ },
31
32
  };