Skip to content

Commit e77322d

Browse files
author
Daniil Yankouski
committed
Update eslint config. Replace yarn with npm.
1 parent 5c95cc2 commit e77322d

Some content is hidden

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

56 files changed

+16404
-5934
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ jobs:
1313
uses: actions/setup-node@v1
1414
with:
1515
node-version: ${{ matrix.node-version }}
16-
- run: yarn install --frozen-lockfile
17-
- run: yarn lint
16+
- run: npm install --frozen-lockfile
17+
- run: npm run lint
1818
tests:
1919
name: Tests
2020
runs-on: ubuntu-latest
@@ -28,8 +28,8 @@ jobs:
2828
uses: actions/setup-node@v1
2929
with:
3030
node-version: ${{ matrix.node-version }}
31-
- run: yarn install --frozen-lockfile
32-
- run: yarn test:ci
31+
- run: npm install --frozen-lockfile
32+
- run: npm run test:ci
3333
build:
3434
name: Build
3535
runs-on: ubuntu-latest
@@ -42,5 +42,5 @@ jobs:
4242
uses: actions/setup-node@v1
4343
with:
4444
node-version: ${{ matrix.node-version }}
45-
- run: yarn install --frozen-lockfile
46-
- run: yarn build
45+
- run: npm install --frozen-lockfile
46+
- run: npm run build

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ dist
1414
coverage
1515
node_modules
1616

17-
package-lock.json
17+
yarn.lock
1818
yarn-error.log
1919

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ Layered Architecture for developing web/mobile/desktop applications using JavaSc
1818
## Getting started
1919

2020
- Clone repository
21-
- Run `yarn` to install dependencies
22-
- Run `yarn build` to build project
21+
- Run `npm install` to install dependencies
22+
- Run `npm run build` to build project
2323

2424
## Docs
2525

@@ -51,7 +51,6 @@ Layered Architecture for developing web/mobile/desktop applications using JavaSc
5151

5252
## System Requirements
5353
- [Node.js 16+](https://nodejs.org/en/download/)
54-
- [yarn](https://yarnpkg.com/en)
5554

5655
## Contributing
5756

configs/.eslintrc

Lines changed: 48 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
{
22
"parser": "@typescript-eslint/parser",
3-
"plugins": ["@typescript-eslint", "import", "prettier", "react-hooks", "sort-keys-fix"],
3+
"plugins": [
4+
"@typescript-eslint",
5+
"prettier",
6+
"sort-keys-fix",
7+
"import"
8+
],
49
"extends": [
5-
"eslint:recommended",
10+
"airbnb",
11+
"airbnb-typescript",
12+
"airbnb/hooks",
613
"plugin:react/recommended",
7-
"plugin:@typescript-eslint/recommended",
14+
"plugin:prettier/recommended",
815
"plugin:import/typescript",
9-
"plugin:prettier/recommended"
16+
"plugin:@typescript-eslint/recommended",
17+
"plugin:@typescript-eslint/recommended-requiring-type-checking"
1018
],
1119
"env": {
1220
"browser": true,
@@ -15,6 +23,7 @@
1523
"jest": true
1624
},
1725
"parserOptions": {
26+
"project": "./tsconfig.json",
1827
"sourceType": "module",
1928
"ecmaFeatures": {
2029
"experimentalObjectRestSpread": true,
@@ -29,8 +38,17 @@
2938
},
3039
"import/resolver": {
3140
"node": {
32-
"extensions": [".js", ".jsx", ".ts", ".tsx"],
33-
"moduleDirectory": ["node_modules", "src/", "./"]
41+
"extensions": [
42+
".js",
43+
".jsx",
44+
".ts",
45+
".tsx"
46+
],
47+
"moduleDirectory": [
48+
"node_modules",
49+
"src/",
50+
"./"
51+
]
3452
}
3553
}
3654
},
@@ -43,25 +61,32 @@
4361
"configs/*"
4462
],
4563
"rules": {
46-
"guard-for-in": "off",
4764
"import/order": [
4865
"error",
4966
{
5067
"alphabetize": {
5168
"order": "asc",
5269
"caseInsensitive": true
5370
},
54-
"groups": ["builtin", "external", "internal", "index", "sibling", "parent"]
71+
"groups": [
72+
"builtin",
73+
"external",
74+
"internal",
75+
"index",
76+
"sibling",
77+
"parent"
78+
]
5579
}
5680
],
81+
"guard-for-in": "off",
5782
"import/extensions": "off",
5883
"import/no-extraneous-dependencies": "off",
5984
"import/no-unresolved": "error",
6085
"import/no-useless-path-segments": "off",
86+
"import/no-cycle": "off",
6187
"import/prefer-default-export": "off",
6288
"linebreak-style": "off",
6389
"lines-between-class-members": "error",
64-
"max-len": "off",
6590
"newline-before-return": "error",
6691
"no-bitwise": "off",
6792
"no-console": "error",
@@ -84,11 +109,15 @@
84109
"one-var-declaration-per-line": "error",
85110
"one-var": "off",
86111
"curly": "error",
112+
"class-methods-use-this": "off",
87113
"object-curly-spacing": "off",
88114
"object-curly-newline": "off",
89115
"object-property-newline": "off",
90116
"prefer-const": "error",
91-
"quote-props": ["error", "as-needed"],
117+
"quote-props": [
118+
"error",
119+
"as-needed"
120+
],
92121
"react/destructuring-assignment": "off",
93122
"react/forbid-prop-types": "off",
94123
"react/no-unused-prop-types": "warn",
@@ -99,11 +128,17 @@
99128
"sort-keys-fix/sort-keys-fix": "error",
100129
"react-hooks/rules-of-hooks": "error",
101130
"react-hooks/exhaustive-deps": "warn",
131+
"react/jsx-props-no-spreading": "off",
102132
"prettier/prettier": "error",
103-
"@typescript-eslint/no-explicit-any": "off",
133+
"@typescript-eslint/no-unsafe-assignment": "off",
134+
"@typescript-eslint/no-explicit-any": "warn",
104135
"@typescript-eslint/no-unnecessary-type-constraint": "off",
105136
"@typescript-eslint/no-namespace": "off",
106137
"@typescript-eslint/member-delimiter-style": "error",
107-
"@typescript-eslint/array-type": "error"
138+
"@typescript-eslint/array-type": "off",
139+
"@typescript-eslint/no-unsafe-call": "off",
140+
"@typescript-eslint/no-unsafe-member-access": "off",
141+
"@typescript-eslint/unbound-method": "off",
142+
"consistent-return": "off"
108143
}
109-
}
144+
}

configs/husky/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
. "$(dirname "$0")/common.sh"
33
. "$(dirname "$0")/_/husky.sh"
44

5-
yarn pre-commit
5+
npm run pre-commit

configs/husky/pre-push

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
. "$(dirname "$0")/common.sh"
33
. "$(dirname "$0")/_/husky.sh"
44

5-
yarn pre-push
5+
npm run pre-push

docs/SCRIPTS.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,34 @@
22

33
All available scripts for project.
44

5-
`yarn` - install dependencies;
5+
`npm install` - install dependencies;
66

77
## Running Application
88

9-
`yarn start` - run dev server;
9+
`npm run start` - run dev server;
1010

11-
`yarn preview` - run build preview server;
11+
`npm run preview` - run build preview server;
1212

13-
`yarn build` - build your application.
13+
`npm run build` - build your application.
1414

1515
## Running Linters
1616

17-
`yarn lint` - check project using eslint and tslint;
17+
`npm run lint` - check project using eslint and tslint;
1818

19-
`yarn eslint` - check project using eslint;
19+
`npm run eslint` - check project using eslint;
2020

21-
- `yarn eslint --fix` - fix all possible eslint issues;
21+
- `npm run eslint --fix` - fix all possible eslint issues;
2222

23-
`yarn tslint` - check project using tslint.
23+
`npm run tslint` - check project using tslint.
2424

2525
## Running Tests
2626

27-
`yarn test` - run all project tests;
27+
`npm run test` - run all project tests;
2828

29-
- `yarn test --updateSnapshot` - update every snapshot that fails during this test run;
29+
- `npm run test --updateSnapshot` - update every snapshot that fails during this test run;
3030

31-
- `yarn test --watch` - watch for changes and re-run tests;
31+
- `npm run test --watch` - watch for changes and re-run tests;
3232

33-
- `yarn test --coverage` - collect code coverage by tests;
33+
- `npm run test --coverage` - collect code coverage by tests;
3434

35-
`yarn test:ci` - run all project tests and collect coverage.
35+
`npm run test:ci` - run all project tests and collect coverage.

0 commit comments

Comments
 (0)