Skip to content

Commit b02190d

Browse files
authored
chore(react): migrate to eslint, add prettier (#26633)
1 parent 2dca54a commit b02190d

Some content is hidden

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

70 files changed

+4681
-1175
lines changed

.github/workflows/actions/build-react/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ runs:
1212
path: ./core
1313
filename: CoreBuild.zip
1414
- name: Install React Dependencies
15-
run: npm install --legacy-peer-deps
15+
run: npm ci
1616
shell: bash
1717
working-directory: ./packages/react
1818
- name: Sync

packages/react/.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
**/__tests__/
2+
**/components/react-component-lib/

packages/react/.eslintrc.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
module.exports = {
2+
"env": {
3+
"browser": true,
4+
"es6": true,
5+
"node": true
6+
},
7+
"extends": [
8+
"eslint:recommended",
9+
"plugin:@typescript-eslint/recommended",
10+
"@ionic/eslint-config/recommended"
11+
],
12+
"parser": "@typescript-eslint/parser",
13+
"parserOptions": {
14+
"project": "tsconfig.json",
15+
"sourceType": "module"
16+
},
17+
"plugins": [
18+
"@typescript-eslint",
19+
],
20+
"rules": {
21+
"@typescript-eslint/explicit-module-boundary-types": "off",
22+
"@typescript-eslint/no-non-null-assertion": "off",
23+
"@typescript-eslint/prefer-optional-chain": "off",
24+
"@typescript-eslint/ban-types": "off"
25+
}
26+
};

packages/react/.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@ dist
22
dist-transpiled
33
*.md
44
build
5+
proxies.ts
6+
react-component-lib

packages/react/.prettierrc.json

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

0 commit comments

Comments
 (0)