eslint-config-prettier 8.3.0 → 8.4.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 +1 -1
- package/bin/cli.js +7 -10
- package/index.js +1 -0
- package/package.json +1 -1
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 =
|
|
34
|
-
|
|
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.
|
|
187
|
-
.
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
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
|
@@ -170,6 +170,7 @@ module.exports = {
|
|
|
170
170
|
"vue/object-curly-spacing": "off",
|
|
171
171
|
"vue/object-property-newline": "off",
|
|
172
172
|
"vue/operator-linebreak": "off",
|
|
173
|
+
"vue/quote-props": "off",
|
|
173
174
|
"vue/script-indent": "off",
|
|
174
175
|
"vue/singleline-html-element-content-newline": "off",
|
|
175
176
|
"vue/space-in-parens": "off",
|