Skip to content

Commit d874c31

Browse files
committed
fixed new lint rules
1 parent 5d8ec8b commit d874c31

33 files changed

+845
-599
lines changed

.eslintrc.js

+61-104
Original file line numberDiff line numberDiff line change
@@ -4,115 +4,72 @@ module.exports = {
44
es6: true,
55
node: true,
66
},
7-
ignorePatterns: ['node_modules'],
7+
ignorePatterns: ['node_modules', '**/__mocks__*', '**/__tests__*', '**/*.spec.*'],
88
parser: '@typescript-eslint/parser',
99
parserOptions: {
1010
project: 'tsconfig.json',
1111
sourceType: 'module',
1212
},
13-
plugins: ['@typescript-eslint'],
14-
extends: ['prettier', 'prettier/react'],
13+
plugins: ['react', 'prettier', '@typescript-eslint'],
14+
extends: [
15+
'eslint:recommended',
16+
'plugin:react/recommended',
17+
'airbnb-typescript',
18+
'plugin:@typescript-eslint/eslint-recommended',
19+
'plugin:@typescript-eslint/recommended',
20+
'plugin:@typescript-eslint/recommended-requiring-type-checking',
21+
'prettier',
22+
'plugin:prettier/recommended',
23+
'prettier/@typescript-eslint',
24+
'prettier/react',
25+
],
1526
rules: {
16-
'@typescript-eslint/adjacent-overload-signatures': 'warn',
17-
'@typescript-eslint/array-type': 'warn',
18-
'@typescript-eslint/ban-types': 'warn',
19-
'@typescript-eslint/class-name-casing': 'warn',
20-
'@typescript-eslint/consistent-type-assertions': 'warn',
21-
'@typescript-eslint/indent': ['off', 2],
22-
'@typescript-eslint/member-delimiter-style': [
23-
'off',
24-
{
25-
multiline: {
26-
delimiter: 'none',
27-
requireLast: true,
28-
},
29-
singleline: {
30-
delimiter: 'semi',
31-
requireLast: false,
32-
},
33-
},
34-
],
35-
'@typescript-eslint/member-ordering': 'off',
36-
'@typescript-eslint/no-empty-function': 'warn',
37-
'@typescript-eslint/no-empty-interface': 'warn',
38-
'@typescript-eslint/no-explicit-any': 'off',
39-
'@typescript-eslint/no-misused-new': 'warn',
40-
'@typescript-eslint/no-namespace': 'warn',
41-
'@typescript-eslint/no-parameter-properties': 'off',
42-
'@typescript-eslint/no-this-alias': 'warn',
43-
'@typescript-eslint/no-use-before-define': 'off',
44-
'@typescript-eslint/no-var-requires': 'warn',
45-
'@typescript-eslint/prefer-for-of': 'warn',
46-
'@typescript-eslint/prefer-function-type': 'warn',
47-
'@typescript-eslint/prefer-namespace-keyword': 'warn',
48-
'@typescript-eslint/quotes': ['warn', 'single'],
49-
'@typescript-eslint/semi': ['off', null],
50-
'@typescript-eslint/triple-slash-reference': 'warn',
51-
'@typescript-eslint/type-annotation-spacing': 'off',
52-
'@typescript-eslint/unified-signatures': 'warn',
53-
'arrow-parens': ['off', 'as-needed'],
54-
camelcase: 'off',
55-
'comma-dangle': 'off',
56-
complexity: 'off',
57-
'constructor-super': 'warn',
58-
'dot-notation': 'warn',
59-
'eol-last': 'off',
60-
eqeqeq: ['warn', 'smart'],
61-
'guard-for-in': 'warn',
62-
'id-blacklist': 'off',
63-
'id-match': 'off',
64-
'import/no-internal-modules': 'off',
65-
'linebreak-style': 'off',
66-
'max-classes-per-file': ['warn', 1],
67-
'max-len': 'off',
68-
'new-parens': 'off',
69-
'newline-per-chained-call': 'off',
70-
'no-bitwise': 'warn',
71-
'no-caller': 'warn',
72-
'no-cond-assign': 'warn',
73-
'no-console': 'warn',
74-
'no-debugger': 'warn',
75-
'no-duplicate-case': 'warn',
76-
'no-duplicate-imports': 'warn',
77-
'no-empty': 'warn',
78-
'no-eval': 'warn',
79-
'no-extra-bind': 'warn',
80-
'no-extra-semi': 'off',
81-
'no-fallthrough': 'off',
82-
'no-invalid-this': 'off',
83-
'no-irregular-whitespace': 'off',
84-
'no-multiple-empty-lines': 'off',
85-
'no-new-func': 'warn',
86-
'no-new-wrappers': 'warn',
87-
'no-redeclare': 'warn',
88-
'no-return-await': 'warn',
89-
'no-sequences': 'warn',
90-
'no-shadow': [
91-
'warn',
92-
{
93-
hoist: 'all',
94-
},
95-
],
96-
'no-sparse-arrays': 'warn',
97-
'no-template-curly-in-string': 'warn',
98-
'no-throw-literal': 'warn',
99-
'no-trailing-spaces': 'off',
100-
'no-undef-init': 'warn',
101-
'no-underscore-dangle': 'off',
102-
'no-unsafe-finally': 'warn',
103-
'no-unused-expressions': 'warn',
104-
'no-unused-labels': 'warn',
105-
'no-var': 'warn',
106-
'object-shorthand': 'warn',
107-
'one-var': ['warn', 'never'],
108-
'prefer-const': 'warn',
109-
'prefer-object-spread': 'warn',
110-
'quote-props': 'off',
111-
radix: 'warn',
112-
'space-before-function-paren': 'off',
113-
'space-in-parens': ['off', 'never'],
114-
'spaced-comment': 'warn',
115-
'use-isnan': 'warn',
116-
'valid-typeof': 'off',
27+
'@typescript-eslint/interface-name-prefix': ['warn', { prefixWithI: 'always' }],
28+
'import/prefer-default-export': 'off',
29+
'react/prop-types': 'off',
30+
'react/state-in-constructor': 'off',
31+
// '@typescript-eslint/adjacent-overload-signatures': 'warn',
32+
// '@typescript-eslint/array-type': 'warn',
33+
// '@typescript-eslint/ban-types': 'warn',
34+
// '@typescript-eslint/class-name-casing': 'warn',
35+
// '@typescript-eslint/consistent-type-assertions': 'warn',
36+
// '@typescript-eslint/indent': ['off', 2],
37+
// '@typescript-eslint/member-delimiter-style': [
38+
// 'off',
39+
// {
40+
// multiline: {
41+
// delimiter: 'none',
42+
// requireLast: true,
43+
// },
44+
// singleline: {
45+
// delimiter: 'semi',
46+
// requireLast: false,
47+
// },
48+
// },
49+
// ],
50+
// '@typescript-eslint/member-ordering': 'off',
51+
// '@typescript-eslint/no-empty-function': 'warn',
52+
// '@typescript-eslint/no-empty-interface': 'warn',
53+
// '@typescript-eslint/no-explicit-any': 'off',
54+
// '@typescript-eslint/no-misused-new': 'warn',
55+
// '@typescript-eslint/no-namespace': 'warn',
56+
// '@typescript-eslint/no-parameter-properties': 'off',
57+
// '@typescript-eslint/no-this-alias': 'warn',
58+
// '@typescript-eslint/no-use-before-define': 'off',
59+
// '@typescript-eslint/no-var-requires': 'warn',
60+
// '@typescript-eslint/prefer-for-of': 'warn',
61+
// '@typescript-eslint/prefer-function-type': 'warn',
62+
// '@typescript-eslint/prefer-namespace-keyword': 'warn',
63+
// '@typescript-eslint/quotes': ['warn', 'single'],
64+
// '@typescript-eslint/semi': ['off', null],
65+
// '@typescript-eslint/triple-slash-reference': 'warn',
66+
// '@typescript-eslint/type-annotation-spacing': 'off',
67+
// '@typescript-eslint/unified-signatures': 'warn',
68+
// 'arrow-parens': ['off', 'as-needed'],
69+
},
70+
settings: {
71+
react: {
72+
version: 'detect',
73+
},
11774
},
11875
};

Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# DEV BUILD STEP
2-
FROM node:10.15.3-alpine as devBuild
2+
FROM node:12.16.1-alpine3.11 as devBuild
33
WORKDIR /usr/src/app
44

55
# Log the settings for NPM and Environment variables
@@ -13,7 +13,7 @@ RUN npm run build
1313

1414
# PROD BUILD STEP
1515
# Using latest LTS release of Node
16-
FROM node:10.15.3-alpine
16+
FROM node:12.16.1-alpine3.11
1717

1818
# Create an app directory on the container
1919
WORKDIR /usr/src/app

build/README.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ WARNING: Do not write code in this directory because it will be deleted during b
44

55
### Directory Structure
66

7-
*build*:
8-
- *app*: App is compiled here using ```npm build```.
9-
- static: Static version of the site is compiled here using ```npm run build-static-website```.
7+
_build_:
8+
9+
- _app_: App is built here using `npm build`.
10+
- static: Static version of the site is built here using `npm run build-static-website`.

next.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ module.exports = withCSS({
4848
],
4949
});
5050
}
51-
config.node = { fs: 'empty', net: 'empty' };
51+
config.node = { net: {} };
5252
return config;
5353
},
5454
cssModules: false,

0 commit comments

Comments
 (0)