Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: config lint for typescript #840

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
20 changes: 17 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,30 @@
module.exports = {
env: {
jest: true,
browser: true,
node: true,
es2021: true,
},
parser: '@babel/eslint-parser',
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 12,
sourceType: 'module',
babelOptions: {
presets: ['@babel/preset-react'],
},
},
plugins: ['react', 'prettier'],
extends: ['airbnb', 'prettier', 'plugin:prettier/recommended'],
plugins: ['react', 'prettier', '@typescript-eslint', 'eslint-plugin-node'],
extends: [
'airbnb',
'prettier',
'plugin:prettier/recommended',
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/consistent-type-definitions': ['error', 'type'],
'prettier/prettier': 'error',
'import/no-cycle': 0,
'import/no-unresolved': 0,
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"dev:web": "lerna run dev --scope=@gympass/yoga-doc --stream",
"dev:native:android": "lerna run android --scope=@gympass/yoga-labnative --stream",
"dev:native:ios": "lerna run ios --scope=@gympass/yoga-labnative --stream",
"lint": "eslint --ext js,jsx,android.jsx,ios.jsx",
"lint": "eslint --ext js,jsx,android.jsx,ios.jsx,ts,tsx,android.ts,android.tsx",
"lint:yoga": "NODE_ENV=test yarn lint packages/yoga",
"lint:doc": "NODE_ENV=test yarn lint packages/doc",
"lint:labnative": "NODE_ENV=test yarn lint packages/labnative",
Expand Down Expand Up @@ -61,6 +61,7 @@
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-prettier": "4.0.0",
"eslint-plugin-node": "^11.1.0",
"fs-extra": "^11.2.0",
"git-last-commit": "^1.0.0",
"glob": "^10.3.12",
Expand Down
Loading