Skip to content

Commit

Permalink
🚨 Add ESLint Configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
0x46616c6b committed Jun 7, 2022
1 parent d6050a4 commit 967a9a3
Show file tree
Hide file tree
Showing 5 changed files with 833 additions and 741 deletions.
10 changes: 0 additions & 10 deletions .eslintrc

This file was deleted.

48 changes: 48 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
}
},
"plugins": [
"react",
"react-hooks",
"@typescript-eslint"
],
"rules": {
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": "warn",
"no-console": "warn",
"react/jsx-boolean-value": [
"warn",
"never"
],
"react/jsx-no-bind": "warn",
"react/jsx-sort-props": [
"warn",
{
"reservedFirst": true
}
],
"react/prop-types": "off",
"react/react-in-jsx-scope": "off"
},
"settings": {
"react": {
"version": "detect"
}
},
"env": {
"browser": true,
"node": true
}
}
12 changes: 10 additions & 2 deletions .github/workflows/quality.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,20 @@ jobs:
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: '16'
cache: 'yarn'
node-version: "16"
cache: "yarn"

- name: Install Dependencies
run: yarn install --frozen-lockfile

- name: Run ESLint
uses: wearerequired/lint-action@v2
with:
check_name: ESLint Results
eslint: true
eslint_extensions: ts,tsx,js,jsx
eslint_dir: src

- name: Run Prettier
uses: wearerequired/lint-action@v2
with:
Expand Down
18 changes: 7 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
"@semantic-ui-react/css-patch": "^1.0.0",
"@types/node": "^17.0.40",
"@types/react": "^18.0.12",
"@typescript-eslint/eslint-plugin": "^5.27.1",
"@typescript-eslint/parser": "^5.27.1",
"@webpack-cli/serve": "^1.6.1",
"babel-eslint": "^10.1.0",
"babel-loader": "^8.2.5",
Expand All @@ -24,14 +26,11 @@
"dotenv": "^8.2.0",
"dotenv-expand": "^5.1.0",
"dotenv-webpack": "^7.1.0",
"eslint": "^6.8.0",
"eslint-config-airbnb": "^18.1.0",
"eslint-config-react-app": "^5.2.1",
"eslint-loader": "^4.0.0",
"eslint-plugin-flowtype": "^4.7.0",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-jsx-a11y": "^6.2.1",
"eslint-plugin-react": "^7.19.0",
"eslint": "^8.17.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.30.0",
"eslint-plugin-react-hooks": "^4.5.0",
"file-loader": "^6.2.0",
"history": "^4.9.0",
"html-webpack-plugin": "^5.5.0",
Expand Down Expand Up @@ -82,8 +81,5 @@
"build": "webpack --config webpack.prod.config.ts",
"dist": "tar -C dist -c -z -f release.tar.gz .",
"postinstall": "semantic-ui-css-patch"
},
"eslintConfig": {
"extends": "react-app"
}
}
Loading

0 comments on commit 967a9a3

Please sign in to comment.