Skip to content

Commit

Permalink
👷 CI - Add linter step
Browse files Browse the repository at this point in the history
  • Loading branch information
AudBrou committed Feb 23, 2023
1 parent 9cadbba commit d8486a7
Show file tree
Hide file tree
Showing 6 changed files with 79 additions and 9 deletions.
5 changes: 2 additions & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking"
"plugin:@typescript-eslint/recommended"
],
"parser": "@typescript-eslint/parser",
"settings": {
Expand All @@ -26,7 +25,7 @@
"jsx": true
}
},
"plugins": ["react", "@typescript-eslint", "react-hooks"],
"plugins": ["react", "@typescript-eslint", "react-hooks", "prettier"],
"rules": {
"@typescript-eslint/semi": ["error", "always"],
"@typescript-eslint/space-before-function-paren": 0,
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ jobs:
with:
node-version: 18
- name: Install dependencies
run: npm ci
run: npm ci --ignore-scripts
- name: Rebuild & Prepare dependencies
run: npm rebuild && npm run prepare --if-present
- name: Run lint
run: npm run lint
- name: Compile
run: npm run tsc
2 changes: 1 addition & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"printWidth": 100,
"tabWidth": 4,
"trailingComma": "all",
"endOfLine": "crlf",
"endOfLine": "lf",
"overrides": [
{
"files": "*.json",
Expand Down
68 changes: 66 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
],
"scripts": {
"test": "jest",
"tsc": "tsc --project tsconfig.build.json"
"tsc": "tsc --project tsconfig.build.json",
"lint": "prettier --check ."
},
"keywords": [
"react-native",
Expand All @@ -51,6 +52,7 @@
"eslint": "^8.34.0",
"eslint-config-prettier": "^8.6.0",
"eslint-config-standard-with-typescript": "19.0.1",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"jest": "^28.1.1",
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@
"skipLibCheck": true,
"strict": true,
"target": "esnext"
}
},
"include": ["src", "example"]
}

0 comments on commit d8486a7

Please sign in to comment.