Skip to content

Commit 4f0a45c

Browse files
authored
chore: upgrade misc files (#730)
1 parent a28c207 commit 4f0a45c

21 files changed

+1769
-1834
lines changed

.editorconfig

+4-9
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,15 @@
1-
# EditorConfig helps developers define and maintain consistent
2-
# coding styles between different editors and IDEs
3-
# http://editorconfig.org
1+
# EditorConfig is awesome: https://EditorConfig.org
42

3+
# top-most EditorConfig file
54
root = true
65

76
[*]
8-
9-
# Change these settings to your own preference
107
indent_style = space
118
indent_size = 2
12-
13-
# We recommend you to keep these unchanged
149
end_of_line = lf
1510
charset = utf-8
1611
trim_trailing_whitespace = true
1712
insert_final_newline = true
1813

19-
# editorconfig-tools is unable to ignore longs strings or urls
20-
max_line_length = null
14+
[*.md]
15+
trim_trailing_whitespace = false

.eslintrc.cjs

+76-75
Original file line numberDiff line numberDiff line change
@@ -4,138 +4,139 @@ module.exports = {
44
node: true,
55
},
66
extends: [
7-
'airbnb-base',
8-
'plugin:editorconfig/noconflict',
9-
'plugin:promise/recommended',
10-
'plugin:array-func/all',
11-
'plugin:node/recommended',
12-
'plugin:security-node/recommended',
13-
'plugin:unicorn/all',
14-
'plugin:eslint-comments/recommended',
15-
'plugin:prettier/recommended',
16-
'plugin:jest/all',
17-
'prettier',
7+
"airbnb-base",
8+
"plugin:editorconfig/noconflict",
9+
"plugin:promise/recommended",
10+
"plugin:array-func/all",
11+
"plugin:node/recommended",
12+
"plugin:security/recommended",
13+
"plugin:unicorn/all",
14+
"plugin:eslint-comments/recommended",
15+
"plugin:prettier/recommended",
16+
"plugin:jest/all",
17+
"prettier",
1818
],
1919
overrides: [
2020
{
21-
files: ['./*', 'setup-tests.js', 'setupTests.js'],
21+
files: ["./*", "setup-tests.js", "setupTests.js"],
2222
rules: {
23-
'import/no-extraneous-dependencies': [
24-
'error',
23+
"import/no-extraneous-dependencies": [
24+
"error",
2525
{
2626
devDependencies: true,
2727
},
2828
],
29-
'node/no-extraneous-import': 'off',
30-
'node/no-unpublished-import': 'off',
31-
'node/no-unpublished-require': 'off',
32-
'no-console': 'off',
29+
"node/no-extraneous-import": "off",
30+
"node/no-unpublished-import": "off",
31+
"node/no-unpublished-require": "off",
32+
"no-console": "off",
3333
},
3434
},
3535
{
3636
env: {
37-
'jest/globals': true,
37+
"jest/globals": true,
3838
},
39-
files: ['**/*.test.js'],
39+
files: ["**/*.test.js"],
4040
rules: {
41-
'import/no-extraneous-dependencies': [
42-
'error',
41+
"import/no-extraneous-dependencies": [
42+
"error",
4343
{
4444
devDependencies: true,
4545
},
4646
],
47-
'no-magic-numbers': 'off',
48-
'node/no-extraneous-import': 'off',
47+
"no-magic-numbers": "off",
48+
"node/no-extraneous-import": "off",
49+
"jest/require-hook": "error",
4950
},
5051
},
5152
{
5253
env: {
53-
'jest/globals': true,
54+
"jest/globals": true,
5455
},
55-
files: ['**/__mocks__/**'],
56+
files: ["**/__mocks__/**"],
5657
rules: {
57-
'import/prefer-default-export': 'off',
58-
'no-magic-numbers': 'off',
58+
"import/prefer-default-export": "off",
59+
"no-magic-numbers": "off",
5960
},
6061
},
6162
],
6263
parserOptions: {
6364
ecmaVersion: 2021,
6465
},
6566
plugins: [
66-
'prettier',
67-
'promise',
68-
'unicorn',
69-
'array-func',
70-
'node',
71-
'eslint-comments',
72-
'jest',
73-
'simple-import-sort',
74-
'editorconfig',
75-
'security-node',
67+
"prettier",
68+
"promise",
69+
"unicorn",
70+
"array-func",
71+
"node",
72+
"eslint-comments",
73+
"jest",
74+
"simple-import-sort",
75+
"editorconfig",
76+
"security",
7677
],
7778
root: true,
7879
rules: {
79-
'no-param-reassign': ['error', { props: false }],
80+
"no-param-reassign": ["error", { props: false }],
8081
// 'consistent-return': 'off',
8182
// 'arrow-body-style': 0,
8283
// 'comma-dangle': 0,
8384
// 'import/prefer-await-to-then': 'off',
8485
// 'no-underscore-dangle': 'off',
85-
'unicorn/no-null': 'off',
86-
'import/extensions': [
87-
'error',
88-
'ignorePackages',
86+
"unicorn/no-null": "off",
87+
"import/extensions": [
88+
"error",
89+
"ignorePackages",
8990
{
90-
js: 'never',
91-
ts: 'never',
92-
tsx: 'never',
91+
js: "never",
92+
ts: "never",
93+
tsx: "never",
9394
},
9495
],
95-
'no-void': ['error', { allowAsStatement: true }],
96-
'no-magic-numbers': [
97-
'error',
96+
"no-void": ["error", { allowAsStatement: true }],
97+
"no-magic-numbers": [
98+
"error",
9899
{
99100
ignore: [0, 1, -1],
100101
ignoreDefaultValues: true,
101102
},
102103
],
103-
'no-console': 'off',
104-
'jest/prefer-expect-assertions': 'off',
105-
'jest/no-conditional-expect': 'off',
106-
'jest/expect-expect': 'off',
107-
'jest/prefer-strict-equal': 'off',
108-
'unicorn/prefer-spread': 'off',
109-
'simple-import-sort/imports': [
110-
'error',
104+
"no-console": "off",
105+
"jest/prefer-expect-assertions": "off",
106+
"jest/no-conditional-expect": "off",
107+
"jest/expect-expect": "off",
108+
"jest/prefer-strict-equal": "off",
109+
"unicorn/prefer-spread": "off",
110+
"simple-import-sort/imports": [
111+
"error",
111112
{
112113
groups: [
113114
// Node.js builtins.
114115
// eslint-disable-next-line global-require
115-
[`^(${require('module').builtinModules.join('|')})(/|$)`],
116+
[`^(${require("module").builtinModules.join("|")})(/|$)`],
116117
// Packages.
117-
['^@?(\\w|.)[^./]'],
118+
["^@?(\\w|.)[^./]"],
118119
// Side effect imports.
119-
['^\\u0000'],
120+
["^\\u0000"],
120121
// Parent imports. Put `..` last.
121-
['^\\.\\.(?!/?$)', '^\\.\\./?$'],
122+
["^\\.\\.(?!/?$)", "^\\.\\./?$"],
122123
// Other relative imports. Put same-folder imports and `.` last.
123-
['^\\./(?=.*/)(?!/?$)', '^\\.(?!/?$)', '^\\./?$'],
124+
["^\\./(?=.*/)(?!/?$)", "^\\.(?!/?$)", "^\\./?$"],
124125
],
125126
},
126127
],
127-
'simple-import-sort/exports': 'error',
128-
'import/order': 'off',
129-
'no-loss-of-precision': 'warn',
130-
'promise/no-nesting': 'error',
131-
'unicorn/prefer-node-protocol': 'off',
132-
'security-node/detect-crlf': 'warn',
133-
'unicorn/no-unsafe-regex': 'warn',
134-
'unicorn/prefer-at': 'off',
135-
'unicorn/no-process-exit': 'off',
136-
'no-process-exit': 'off',
137-
'unicorn/no-array-for-each': 'off',
138-
'unicorn/prefer-top-level-await': 'off',
139-
'unicorn/no-array-reduce': 'off',
128+
"simple-import-sort/exports": "error",
129+
"import/order": "off",
130+
"no-loss-of-precision": "warn",
131+
"promise/no-nesting": "error",
132+
"unicorn/prefer-node-protocol": "off",
133+
"unicorn/no-unsafe-regex": "warn",
134+
"unicorn/prefer-at": "off",
135+
"unicorn/no-process-exit": "off",
136+
"no-process-exit": "off",
137+
"unicorn/no-array-for-each": "off",
138+
"unicorn/prefer-top-level-await": "off",
139+
"unicorn/no-array-reduce": "off",
140+
"jest/require-hook": "off",
140141
},
141142
};

.gitattributes

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
* text=auto eol=lf
2+
*.md linguist-detectable

0 commit comments

Comments
 (0)