Skip to content

Commit fdb078c

Browse files
authored
chore: update prettier to v2 (#322)
1 parent b3c394a commit fdb078c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+125
-125
lines changed

globals/kintone.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ module.exports = {
1313
Chart: false,
1414
DOMPurify: false,
1515
Spinner: false,
16-
UltraDate: false
17-
}
16+
UltraDate: false,
17+
},
1818
};

lib/base.js

+26-26
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ module.exports = {
33
plugins: ["import"],
44
parserOptions: {
55
ecmaVersion: 2019,
6-
sourceType: "module"
6+
sourceType: "module",
77
},
88
env: {
99
browser: true,
1010
es6: true,
11-
commonjs: true
11+
commonjs: true,
1212
},
1313
rules: {
1414
// =======
@@ -38,8 +38,8 @@ module.exports = {
3838
"error",
3939
{
4040
allowShortCircuit: true,
41-
allowTernary: true
42-
}
41+
allowTernary: true,
42+
},
4343
],
4444
"no-useless-concat": "error",
4545
"no-void": "error",
@@ -64,8 +64,8 @@ module.exports = {
6464
"valid-typeof": [
6565
"error",
6666
{
67-
requireStringLiterals: true
68-
}
67+
requireStringLiterals: true,
68+
},
6969
],
7070
// for-direction
7171
// getter-return
@@ -103,8 +103,8 @@ module.exports = {
103103
"error",
104104
{
105105
vars: "local",
106-
args: "none"
107-
}
106+
args: "none",
107+
},
108108
],
109109
// no-delete-var
110110
// no-undef
@@ -114,8 +114,8 @@ module.exports = {
114114
"no-confusing-arrow": [
115115
"error",
116116
{
117-
allowParens: true
118-
}
117+
allowParens: true,
118+
},
119119
],
120120
"no-useless-computed-key": "error",
121121
"no-useless-rename": "error",
@@ -155,17 +155,17 @@ module.exports = {
155155
"warn",
156156
"always",
157157
{
158-
null: "ignore"
159-
}
158+
null: "ignore",
159+
},
160160
],
161161
"guard-for-in": "warn",
162162
"no-div-regex": "warn",
163163
"no-else-return": "warn",
164164
"no-empty-function": [
165165
"warn",
166166
{
167-
allow: ["arrowFunctions", "functions", "methods"]
168-
}
167+
allow: ["arrowFunctions", "functions", "methods"],
168+
},
169169
],
170170
"no-extra-label": "warn",
171171
"no-invalid-this": "warn",
@@ -194,8 +194,8 @@ module.exports = {
194194
"warn",
195195
{
196196
destructuring: "all",
197-
ignoreReadBeforeAssign: true
198-
}
197+
ignoreReadBeforeAssign: true,
198+
},
199199
],
200200
"prefer-spread": "warn",
201201
"rest-spread-spacing": "warn",
@@ -223,8 +223,8 @@ module.exports = {
223223
"warn",
224224
{
225225
max: 2,
226-
maxEOF: 1
227-
}
226+
maxEOF: 1,
227+
},
228228
],
229229
"no-nested-ternary": "warn",
230230
"no-trailing-spaces": "warn",
@@ -235,17 +235,17 @@ module.exports = {
235235
"object-property-newline": [
236236
"warn",
237237
{
238-
allowAllPropertiesOnSameLine: true
239-
}
238+
allowAllPropertiesOnSameLine: true,
239+
},
240240
],
241241
"one-var-declaration-per-line": "warn",
242242
"operator-assignment": "warn",
243243
quotes: [
244244
"warn",
245245
"single",
246246
{
247-
allowTemplateLiterals: true
248-
}
247+
allowTemplateLiterals: true,
248+
},
249249
],
250250
semi: "warn",
251251
"semi-spacing": "warn",
@@ -256,8 +256,8 @@ module.exports = {
256256
{
257257
anonymous: "never",
258258
named: "never",
259-
asyncArrow: "always"
260-
}
259+
asyncArrow: "always",
260+
},
261261
],
262262
"space-in-parens": "warn",
263263
"space-infix-ops": "warn",
@@ -268,7 +268,7 @@ module.exports = {
268268
"unicode-bom": "warn",
269269

270270
// eslint-plugin-import
271-
"import/no-duplicates": "warn"
271+
"import/no-duplicates": "warn",
272272

273273
// =====
274274
// None
@@ -368,5 +368,5 @@ module.exports = {
368368
// sort-keys
369369
// sort-vars
370370
// wrap-regex
371-
}
371+
},
372372
};

lib/es5.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ module.exports = {
88
extends: ["eslint:recommended"],
99
parserOptions: {
1010
ecmaVersion: 5,
11-
sourceType: "script"
11+
sourceType: "script",
1212
},
1313
env: {
1414
browser: true,
15-
commonjs: true
15+
commonjs: true,
1616
},
1717
rules: Object.assign({}, baseRules, {
1818
// Disable all rules about ES6
@@ -47,6 +47,6 @@ module.exports = {
4747
"sort-imports": "off",
4848
"symbol-description": "off",
4949
"template-curly-spacing": "off",
50-
"yield-star-spacing": "off"
51-
})
50+
"yield-star-spacing": "off",
51+
}),
5252
};

lib/flowtype.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ module.exports = {
1515
"error",
1616
{
1717
allowShortCircuit: true,
18-
allowTernary: true
19-
}
18+
allowTernary: true,
19+
},
2020
],
2121
"flowtype/object-type-delimiter": ["error", "comma"],
2222
// flowtype/space-after-type-colon
@@ -29,7 +29,7 @@ module.exports = {
2929
// Warn
3030
// =======
3131
// flowtype/define-flow-type
32-
"flowtype/semi": "warn"
32+
"flowtype/semi": "warn",
3333
// flowtype/use-flow-type
3434

3535
// =======
@@ -44,5 +44,5 @@ module.exports = {
4444
// flowtype/require-valid-file-annotation
4545
// flowtype/require-variable-type
4646
// flowtype/sort-keys
47-
}
47+
},
4848
};

lib/kintone.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports = {
22
rules: {
3-
strict: ["error", "function"]
4-
}
3+
strict: ["error", "function"],
4+
},
55
};

lib/node-typescript.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports = {
22
rules: {
3-
"node/no-unsupported-features/es-syntax": "off"
4-
}
3+
"node/no-unsupported-features/es-syntax": "off",
4+
},
55
};

lib/node.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ module.exports = {
33
settings: {
44
node: {
55
// https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-missing-import.md#tryextensions
6-
tryExtensions: [".js", ".json", ".node", ".ts", ".jsx", ".tsx"]
7-
}
6+
tryExtensions: [".js", ".json", ".node", ".ts", ".jsx", ".tsx"],
7+
},
88
},
99
rules: {
10-
"no-console": "off"
10+
"no-console": "off",
1111
},
1212
parserOptions: {
13-
ecmaVersion: 2020
14-
}
13+
ecmaVersion: 2020,
14+
},
1515
};

lib/prettier-flowtype.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module.exports = {
2-
extends: ["prettier/flowtype"]
2+
extends: ["prettier/flowtype"],
33
};

lib/prettier-react.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module.exports = {
2-
extends: ["prettier/react"]
2+
extends: ["prettier/react"],
33
};

lib/prettier-typescript.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module.exports = {
2-
extends: ["prettier/@typescript-eslint"]
2+
extends: ["prettier/@typescript-eslint"],
33
};

lib/prettier.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module.exports = {
2-
extends: ["plugin:prettier/recommended"]
2+
extends: ["plugin:prettier/recommended"],
33
};

lib/react-typescript.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module.exports = {
22
rules: {
33
"react/jsx-filename-extension": ["error", { extensions: [".tsx"] }],
4-
"react/prop-types": ["off", {}]
5-
}
4+
"react/prop-types": ["off", {}],
5+
},
66
};

lib/react.js

+13-13
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ module.exports = {
33
extends: ["plugin:react/recommended"],
44
parserOptions: {
55
ecmaFeatures: {
6-
jsx: true
7-
}
6+
jsx: true,
7+
},
88
},
99
settings: {
1010
react: {
11-
version: "detect"
12-
}
11+
version: "detect",
12+
},
1313
},
1414
rules: {
1515
// =======
@@ -40,7 +40,7 @@ module.exports = {
4040
"react/prefer-es6-class": "error",
4141
"react/prefer-stateless-function": [
4242
"error",
43-
{ ignorePureComponents: true }
43+
{ ignorePureComponents: true },
4444
],
4545
// react/prop-types too strict?
4646
// react/react-in-jsx-scope
@@ -70,9 +70,9 @@ module.exports = {
7070
"static-methods",
7171
"lifecycle",
7272
"everything-else",
73-
"render"
74-
]
75-
}
73+
"render",
74+
],
75+
},
7676
],
7777

7878
"react/jsx-boolean-value": "warn",
@@ -87,7 +87,7 @@ module.exports = {
8787
"react/jsx-no-bind": ["warn", { allowArrowFunctions: true }],
8888
"react/jsx-curly-brace-presence": [
8989
"warn",
90-
{ props: "never", children: "never" }
90+
{ props: "never", children: "never" },
9191
],
9292
"react/jsx-pascal-case": ["warn", { allowAllCaps: true }],
9393
"react/jsx-props-no-multi-spaces": "warn",
@@ -96,8 +96,8 @@ module.exports = {
9696
{
9797
closingSlash: "never",
9898
beforeSelfClosing: "always",
99-
afterOpening: "never"
100-
}
99+
afterOpening: "never",
100+
},
101101
],
102102
"react/jsx-wrap-multilines": "warn",
103103

@@ -175,6 +175,6 @@ module.exports = {
175175
"jsx-a11y/role-has-required-aria-props": "warn",
176176
"jsx-a11y/role-supports-aria-props": "warn",
177177
"jsx-a11y/scope": "warn",
178-
"jsx-a11y/tabindex-no-positive": "warn"
179-
}
178+
"jsx-a11y/tabindex-no-positive": "warn",
179+
},
180180
};

lib/typescript.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ module.exports = {
3030
"@typescript-eslint/no-unused-vars": "off",
3131
"@typescript-eslint/no-var-requires": "off",
3232
"@typescript-eslint/prefer-interface": "off",
33-
"@typescript-eslint/prefer-namespace-keyword": "off"
33+
"@typescript-eslint/prefer-namespace-keyword": "off",
3434

3535
// These rules are required type information,
3636
// which means these can be checked without parserOptions.project
3737
// "@typescript-eslint/no-for-in-array": "error",
3838
// "@typescript-eslint/no-unnecessary-type-assertion": "warn",
39-
}
39+
},
4040
};

package-lock.json

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"eslint": "^7.7.0",
3232
"mocha": "^8.1.1",
3333
"npm-run-all": "^4.1.5",
34-
"prettier": "^1.19.1",
34+
"prettier": "^2.1.0",
3535
"react": "^16.13.1",
3636
"standard-version": "^9.0.0",
3737
"typescript": "^4.0.2"

presets/es5-prettier.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module.exports = {
2-
extends: ["../lib/es5.js", "../lib/prettier.js"]
2+
extends: ["../lib/es5.js", "../lib/prettier.js"],
33
};

presets/es5.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module.exports = {
2-
extends: ["../lib/es5.js"]
2+
extends: ["../lib/es5.js"],
33
};

presets/flowtype.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module.exports = {
2-
extends: ["../lib/base.js", "../lib/flowtype.js"]
2+
extends: ["../lib/base.js", "../lib/flowtype.js"],
33
};

0 commit comments

Comments
 (0)