Skip to content

Commit 70de87c

Browse files
authored
chore: upgrade packages versions (#18)
1 parent df07a94 commit 70de87c

File tree

16 files changed

+6100
-17264
lines changed

16 files changed

+6100
-17264
lines changed

.eslintignore

Lines changed: 0 additions & 5 deletions
This file was deleted.

.github/workflows/continuous-integration-workflow.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,41 +6,41 @@ jobs:
66
runs-on: ubuntu-latest
77
strategy:
88
matrix:
9-
node-version: ['16.x']
9+
node-version: ['20.x']
1010
steps:
1111
- uses: actions/checkout@v1
1212
- name: Setting up Node.js (v${{ matrix.node-version }}.x)
1313
uses: actions/setup-node@v1
1414
with:
1515
node-version: ${{ matrix.node-version }}
16-
- run: npm install --frozen-lockfile
16+
- run: npm install --legacy-peer-deps
1717
- run: npm run lint
1818
tests:
1919
name: Tests
2020
runs-on: ubuntu-latest
2121
strategy:
2222
matrix:
23-
node-version: ['16.x']
23+
node-version: ['20.x']
2424
fail-fast: false
2525
steps:
2626
- uses: actions/checkout@v1
2727
- name: Setting up Node.js (v${{ matrix.node-version }}.x)
2828
uses: actions/setup-node@v1
2929
with:
3030
node-version: ${{ matrix.node-version }}
31-
- run: npm install --frozen-lockfile
31+
- run: npm install --legacy-peer-deps
3232
- run: npm run test:ci
3333
build:
3434
name: Build
3535
runs-on: ubuntu-latest
3636
strategy:
3737
matrix:
38-
node-version: ['16.x']
38+
node-version: ['20.x']
3939
steps:
4040
- uses: actions/checkout@v1
4141
- name: Setting up Node.js (v${{ matrix.node-version }}.x)
4242
uses: actions/setup-node@v1
4343
with:
4444
node-version: ${{ matrix.node-version }}
45-
- run: npm install --frozen-lockfile
45+
- run: npm install --legacy-peer-deps
4646
- run: npm run build

eslint.config.js

Lines changed: 194 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,194 @@
1+
/* eslint-disable import/no-unresolved */
2+
/* eslint-disable @typescript-eslint/no-var-requires */
3+
const { fixupConfigRules, fixupPluginRules } = require('@eslint/compat');
4+
5+
const typescriptEslint = require('@typescript-eslint/eslint-plugin');
6+
const path = require('eslint-plugin-path');
7+
const prettier = require('eslint-plugin-prettier');
8+
const sortKeysFix = require('eslint-plugin-sort-keys-fix');
9+
const pluginImport = require('eslint-plugin-import');
10+
const simpleImportSort = require('eslint-plugin-simple-import-sort');
11+
const unusedImports = require('eslint-plugin-unused-imports');
12+
const globals = require('globals');
13+
const tsParser = require('@typescript-eslint/parser');
14+
const js = require('@eslint/js');
15+
16+
const { FlatCompat } = require('@eslint/eslintrc');
17+
18+
const compat = new FlatCompat({
19+
allConfig: js.configs.all,
20+
baseDirectory: __dirname,
21+
recommendedConfig: js.configs.recommended,
22+
});
23+
24+
module.exports = [
25+
{
26+
ignores: [
27+
'node_modules/*',
28+
'**/package.json',
29+
'**/package-lock.json',
30+
'**/yarn.lock',
31+
'**/yarn-error.log',
32+
],
33+
},
34+
...fixupConfigRules(
35+
compat.extends(
36+
'airbnb',
37+
'airbnb-typescript',
38+
'airbnb/hooks',
39+
'plugin:react/recommended',
40+
'plugin:prettier/recommended',
41+
'plugin:import/typescript',
42+
'plugin:@typescript-eslint/recommended',
43+
'plugin:@typescript-eslint/recommended-requiring-type-checking',
44+
),
45+
),
46+
{
47+
languageOptions: {
48+
ecmaVersion: 5,
49+
50+
globals: {
51+
...globals.browser,
52+
...globals.node,
53+
...globals.jest,
54+
},
55+
parser: tsParser,
56+
parserOptions: {
57+
ecmaFeatures: {
58+
experimentalObjectRestSpread: true,
59+
jsx: true,
60+
legacyDecorators: true,
61+
},
62+
63+
project: './tsconfig.json',
64+
65+
useJSXTextNode: true,
66+
},
67+
68+
sourceType: 'module',
69+
},
70+
plugins: {
71+
'@typescript-eslint': fixupPluginRules(typescriptEslint),
72+
import: fixupPluginRules(pluginImport),
73+
path,
74+
prettier: fixupPluginRules(prettier),
75+
'simple-import-sort': simpleImportSort,
76+
'sort-keys-fix': sortKeysFix,
77+
'unused-imports': unusedImports,
78+
},
79+
rules: {
80+
'@typescript-eslint/array-type': 'off',
81+
82+
'@typescript-eslint/member-delimiter-style': 'error',
83+
'@typescript-eslint/no-explicit-any': 'warn',
84+
'@typescript-eslint/no-floating-promises': 'off',
85+
'@typescript-eslint/no-namespace': 'off',
86+
'@typescript-eslint/no-unnecessary-type-constraint': 'off',
87+
'@typescript-eslint/no-unsafe-assignment': 'off',
88+
'@typescript-eslint/no-unsafe-call': 'off',
89+
'@typescript-eslint/no-unsafe-member-access': 'off',
90+
'@typescript-eslint/no-unused-vars': 'off',
91+
'@typescript-eslint/unbound-method': 'off',
92+
'class-methods-use-this': 'off',
93+
'consistent-return': 'off',
94+
curly: 'error',
95+
'guard-for-in': 'off',
96+
'import/extensions': 'off',
97+
'import/no-cycle': 'off',
98+
'import/no-extraneous-dependencies': 'off',
99+
'import/no-unresolved': 'error',
100+
'import/no-useless-path-segments': 'off',
101+
'import/order': 'off',
102+
'import/prefer-default-export': 'off',
103+
'jsx-a11y/control-has-associated-label': 'off',
104+
105+
'linebreak-style': 'off',
106+
107+
'lines-between-class-members': 'error',
108+
'newline-before-return': 'error',
109+
'no-bitwise': 'off',
110+
111+
'no-console': 'error',
112+
113+
'no-multiple-empty-lines': [
114+
'error',
115+
{
116+
max: 1,
117+
maxEOF: 1,
118+
},
119+
],
120+
'no-param-reassign': 'off',
121+
'no-plusplus': 'off',
122+
'no-prototype-builtins': 'off',
123+
'no-restricted-syntax': 'off',
124+
'no-sequences': 'off',
125+
'no-shadow': 'off',
126+
'no-underscore-dangle': 'off',
127+
'no-unused-expressions': 'off',
128+
'no-unused-vars': 'off',
129+
'no-useless-constructor': 'off',
130+
'object-curly-newline': 'off',
131+
'object-curly-spacing': 'off',
132+
'object-property-newline': 'off',
133+
'one-var': 'off',
134+
'one-var-declaration-per-line': 'error',
135+
'path/no-relative-imports': [
136+
'error',
137+
{
138+
maxDepth: 2,
139+
suggested: false,
140+
},
141+
],
142+
'prefer-const': 'error',
143+
'prettier/prettier': 'error',
144+
'quote-props': ['error', 'as-needed'],
145+
'react-hooks/exhaustive-deps': 'warn',
146+
'react-hooks/rules-of-hooks': 'error',
147+
'react/destructuring-assignment': 'off',
148+
149+
'react/forbid-prop-types': 'off',
150+
151+
'react/function-component-definition': 'off',
152+
'react/jsx-props-no-spreading': 'off',
153+
'react/no-unused-prop-types': 'warn',
154+
'react/prefer-stateless-function': 'off',
155+
'react/prop-types': 'warn',
156+
'react/require-default-props': 'off',
157+
'require-await': 'error',
158+
'simple-import-sort/imports': [
159+
'error',
160+
{
161+
groups: [
162+
['^\\u0000', '^react$', '^react', '^@?\\w', '^__mocks__(/.*|$)'],
163+
['^(containers|core|data|domain|presentation|types)(/.*|$)'],
164+
['^\\.\\.(?!/?$)', '^\\.\\./?$', '^\\./(?=.*/)(?!/?$)', '^\\.(?!/?$)', '^\\./?$'],
165+
],
166+
},
167+
],
168+
'sort-keys-fix/sort-keys-fix': 'error',
169+
'unused-imports/no-unused-imports': 'error',
170+
'unused-imports/no-unused-vars': [
171+
'warn',
172+
{
173+
args: 'after-used',
174+
argsIgnorePattern: '^_',
175+
vars: 'all',
176+
varsIgnorePattern: '^_',
177+
},
178+
],
179+
},
180+
181+
settings: {
182+
'import/resolver': {
183+
node: {
184+
extensions: ['.js', '.jsx', '.ts', '.tsx'],
185+
moduleDirectory: ['node_modules', 'src/', './'],
186+
},
187+
},
188+
189+
react: {
190+
version: 'detect',
191+
},
192+
},
193+
},
194+
];

0 commit comments

Comments
 (0)