Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
dist
node_modules
node_modules
public/missing-locales
public/images/custom
public/images/uicons
3 changes: 2 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"extends": [
"airbnb",
"airbnb/rules/react",
"eslint:recommended"
"eslint:recommended",
"prettier"
],
"parserOptions": {
"ecmaVersion": "latest"
Expand Down
37 changes: 23 additions & 14 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,29 @@ name: Lint
on: [push]

jobs:
Lint:
lint:
name: Run Basic Checks
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Checkout Code
id: checkout-code
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Setup Node.js environment
uses: actions/setup-node@v2
with:
node-version: 16
cache: 'yarn'

- name: Test the Testcases
run:
npm install -g yarn
yarn install
yarn build
- name: Install Dependencies
run: yarn

- name: Lint
run: yarn eslint:check

- name: Prettier
run: yarn prettier:check

- name: Build
run: yarn build
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
dist
node_modules
public/missing-locales
public/images/custom
public/images/uicons
5 changes: 5 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"semi": false,
"trailingComma": "all",
"singleQuote": true
}
3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"lokalise.i18n-ally",
"esbenp.prettier-vscode",
"leizongmin.node-module-intellisense",
"eg2.vscode-npm-script"
"eg2.vscode-npm-script",
"graphql.vscode-graphql"
]
}
11 changes: 2 additions & 9 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,12 @@
"public/base-locales"
],
"i18n-ally.keystyle": "flat",
"[typescript]": {
"editor.autoClosingBrackets": "always",
"editor.defaultFormatter": "vscode.typescript-language-features"
},
"[typescriptreact]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
},
"[javascript]": {
"editor.autoClosingBrackets": "always",
"editor.defaultFormatter": "vscode.typescript-language-features"
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascriptreact]": {
"editor.autoClosingBrackets": "always",
"editor.defaultFormatter": "vscode.typescript-language-features"
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
}
12 changes: 9 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@
"migrate:make": "knex --knexfile server/knexfile.cjs migrate:make",
"migrate:latest": "knex --knexfile server/knexfile.cjs migrate:latest",
"migrate:rollback": "knex --knexfile server/knexfile.cjs migrate:rollback",
"release": "node server/scripts/newRelease.js"
"release": "node server/scripts/newRelease.js",
"prettier:check": "prettier --check \"**/*.{js,jsx}\"",
"prettier:fix": "prettier --write \"**/*.{js,jsx}\"",
"eslint:check": "eslint \"**/*.{js,jsx}\"",
"eslint:fix": "eslint \"**/*.{js,jsx}\" --fix"
},
"engines": {
"node": ">=16",
Expand All @@ -39,12 +43,14 @@
"esbuild-server": "^0.1.0",
"eslint": "^8.9.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^8.3.0",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-react": "^7.28.0",
"eslint-plugin-react-hooks": "^4.3.0",
"nodemon": "^2.0.7"
"nodemon": "^2.0.7",
"prettier": "^2.6.2"
},
"dependencies": {
"@apollo/client": "^3.3.11",
Expand Down Expand Up @@ -108,4 +114,4 @@
"suncalc": "^1.8.0",
"zustand": "^4.0.0-rc.1"
}
}
}
Loading