Skip to content
This repository was archived by the owner on Sep 9, 2024. It is now read-only.

Commit e60e1fa

Browse files
authored
Feature/typescript conversion (#44)
1 parent 7fe23ba commit e60e1fa

File tree

517 files changed

+27022
-27179
lines changed

Some content is hidden

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

517 files changed

+27022
-27179
lines changed

.eslintrc.js

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
const fs = require('fs');
2-
31
module.exports = {
42
parser: 'babel-eslint',
53
extends: [
@@ -21,9 +19,13 @@ module.exports = {
2119
CMS_ENV: false,
2220
},
2321
rules: {
22+
'react-hooks/rules-of-hooks': 'error', // Checks rules of Hooks
23+
'react-hooks/exhaustive-deps': 'warn', // Checks effect dependencies
2424
'no-console': [0],
2525
'react/prop-types': [0],
26+
'react/require-default-props': 0,
2627
'import/no-named-as-default': 0,
28+
"react/react-in-jsx-scope": "off",
2729
'import/order': [
2830
'error',
2931
{
@@ -45,8 +47,16 @@ module.exports = {
4547
],
4648
'unicorn/prefer-string-slice': 'error',
4749
'react/no-unknown-property': ['error', { ignore: ['css'] }],
50+
'@typescript-eslint/no-unused-vars': [
51+
'warn',
52+
{
53+
argsIgnorePattern: '^_',
54+
varsIgnorePattern: '^_',
55+
caughtErrorsIgnorePattern: '^_',
56+
},
57+
],
4858
},
49-
plugins: ['babel', '@emotion', 'cypress', 'unicorn'],
59+
plugins: ['babel', '@emotion', 'cypress', 'unicorn', 'react-hooks'],
5060
settings: {
5161
react: {
5262
version: 'detect',
@@ -79,6 +89,9 @@ module.exports = {
7989
},
8090
},
8191
rules: {
92+
"react/react-in-jsx-scope": "off",
93+
'react/prop-types': [0],
94+
'react/require-default-props': 0,
8295
'no-duplicate-imports': [0], // handled by @typescript-eslint
8396
'@typescript-eslint/ban-types': [0], // TODO enable in future
8497
'@typescript-eslint/no-non-null-assertion': [0],

babel.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ function plugins() {
8484
}
8585

8686
if (!isProduction) {
87-
return [...defaultPlugins, 'react-hot-loader/babel'];
87+
return [...defaultPlugins];
8888
}
8989

9090
return defaultPlugins;

0 commit comments

Comments
 (0)