eslint-config-prettier 8.2.0 → 8.5.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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2017, 2018, 2019, 2020, 2021 Simon Lydell and contributors
3
+ Copyright (c) 2017, 2018, 2019, 2020, 2021, 2022 Simon Lydell and contributors
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/bin/cli.js CHANGED
@@ -30,10 +30,8 @@ if (module === require.main) {
30
30
 
31
31
  Promise.all(args.map((file) => eslint.calculateConfigForFile(file)))
32
32
  .then((configs) => {
33
- const rules = [].concat(
34
- ...configs.map(({ rules }, index) =>
35
- Object.entries(rules).map((entry) => [...entry, args[index]])
36
- )
33
+ const rules = configs.flatMap(({ rules }, index) =>
34
+ Object.entries(rules).map((entry) => [...entry, args[index]])
37
35
  );
38
36
  const result = processRules(rules);
39
37
  if (result.stderr) {
@@ -183,12 +181,11 @@ function processRules(configRules) {
183
181
  }
184
182
 
185
183
  function filterRules(rules, fn) {
186
- return Object.entries(rules)
187
- .filter(([ruleName, value]) => fn(ruleName, value))
188
- .reduce((obj, [ruleName]) => {
189
- obj[ruleName] = true;
190
- return obj;
191
- }, Object.create(null));
184
+ return Object.fromEntries(
185
+ Object.entries(rules)
186
+ .filter(([ruleName, value]) => fn(ruleName, value))
187
+ .map(([ruleName]) => [ruleName, true])
188
+ );
192
189
  }
193
190
 
194
191
  function filterRuleNames(rules, fn) {
package/index.js CHANGED
@@ -92,6 +92,8 @@ module.exports = {
92
92
  "wrap-iife": "off",
93
93
  "wrap-regex": "off",
94
94
  "yield-star-spacing": "off",
95
+ "@babel/object-curly-spacing": "off",
96
+ "@babel/semi": "off",
95
97
  "@typescript-eslint/brace-style": "off",
96
98
  "@typescript-eslint/comma-dangle": "off",
97
99
  "@typescript-eslint/comma-spacing": "off",
@@ -103,6 +105,7 @@ module.exports = {
103
105
  "@typescript-eslint/no-extra-semi": "off",
104
106
  "@typescript-eslint/object-curly-spacing": "off",
105
107
  "@typescript-eslint/semi": "off",
108
+ "@typescript-eslint/space-before-blocks": "off",
106
109
  "@typescript-eslint/space-before-function-paren": "off",
107
110
  "@typescript-eslint/space-infix-ops": "off",
108
111
  "@typescript-eslint/type-annotation-spacing": "off",
@@ -168,6 +171,7 @@ module.exports = {
168
171
  "vue/object-curly-spacing": "off",
169
172
  "vue/object-property-newline": "off",
170
173
  "vue/operator-linebreak": "off",
174
+ "vue/quote-props": "off",
171
175
  "vue/script-indent": "off",
172
176
  "vue/singleline-html-element-content-newline": "off",
173
177
  "vue/space-in-parens": "off",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-prettier",
3
- "version": "8.2.0",
3
+ "version": "8.5.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.",