Separate ESLint and Prettier (#3373)
* Disable legacy Prettier ESLint integration * Run Prettier separately * Add caching * Separate -some and -all * Reduce node initszio/stable
parent
0ff7e71ee3
commit
a45da17c48
|
@ -15,6 +15,8 @@ module.exports = {
|
||||||
'simple-import-sort',
|
'simple-import-sort',
|
||||||
],
|
],
|
||||||
rules: {
|
rules: {
|
||||||
|
// Temporary until https://github.com/facebook/react-native/pull/43756 gets into a release.
|
||||||
|
'prettier/prettier': 0,
|
||||||
'react/no-unescaped-entities': 0,
|
'react/no-unescaped-entities': 0,
|
||||||
'react-native/no-inline-styles': 0,
|
'react-native/no-inline-styles': 0,
|
||||||
'simple-import-sort/imports': [
|
'simple-import-sort/imports': [
|
||||||
|
|
|
@ -24,6 +24,8 @@ jobs:
|
||||||
attempt_delay: 2000
|
attempt_delay: 2000
|
||||||
- name: Lint check
|
- name: Lint check
|
||||||
run: yarn lint
|
run: yarn lint
|
||||||
|
- name: Prettier check
|
||||||
|
run: yarn prettier --check .
|
||||||
- name: Check & compile i18n
|
- name: Check & compile i18n
|
||||||
run: yarn intl:build
|
run: yarn intl:build
|
||||||
- name: Type check
|
- name: Type check
|
||||||
|
|
|
@ -104,6 +104,9 @@ google-services.json
|
||||||
# Performance results (Flashlight)
|
# Performance results (Flashlight)
|
||||||
.perf/
|
.perf/
|
||||||
|
|
||||||
|
# ESLint
|
||||||
|
.eslintcache
|
||||||
|
|
||||||
# i18n
|
# i18n
|
||||||
src/locale/locales/_build/
|
src/locale/locales/_build/
|
||||||
src/locale/locales/**/*.js
|
src/locale/locales/**/*.js
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
ios
|
# Ignore everything except the code in src/.
|
||||||
android
|
# Based on https://stackoverflow.com/a/70715829/458193
|
||||||
src/third-party
|
*
|
||||||
src/app.json
|
!src/**/*.js
|
||||||
public
|
!src/**/*.jsx
|
||||||
/bskyweb/templates
|
!src/**/*.ts
|
||||||
/dist/
|
!src/**/*.tsx
|
||||||
/.watchmanconfig
|
!*/
|
||||||
/app.json
|
|
||||||
|
|
||||||
web/index.html
|
# More specific ignores go below.
|
||||||
web-build/*
|
src/locale/locales
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
"test-watch": "NODE_ENV=test jest --watchAll",
|
"test-watch": "NODE_ENV=test jest --watchAll",
|
||||||
"test-ci": "NODE_ENV=test jest --ci --forceExit --reporters=default --reporters=jest-junit",
|
"test-ci": "NODE_ENV=test jest --ci --forceExit --reporters=default --reporters=jest-junit",
|
||||||
"test-coverage": "NODE_ENV=test jest --coverage",
|
"test-coverage": "NODE_ENV=test jest --coverage",
|
||||||
"lint": "eslint ./src --ext .js,.jsx,.ts,.tsx",
|
"lint": "yarn eslint --cache --ext .js,.jsx,.ts,.tsx src",
|
||||||
"typecheck": "tsc --project ./tsconfig.check.json",
|
"typecheck": "tsc --project ./tsconfig.check.json",
|
||||||
"e2e:mock-server": "./jest/dev-infra/with-test-redis-and-db.sh ts-node --project tsconfig.e2e.json __e2e__/mock-server.ts",
|
"e2e:mock-server": "./jest/dev-infra/with-test-redis-and-db.sh ts-node --project tsconfig.e2e.json __e2e__/mock-server.ts",
|
||||||
"e2e:metro": "NODE_ENV=test RN_SRC_EXT=e2e.ts,e2e.tsx expo run:ios",
|
"e2e:metro": "NODE_ENV=test RN_SRC_EXT=e2e.ts,e2e.tsx expo run:ios",
|
||||||
|
@ -314,6 +314,9 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"*{.js,.jsx,.ts,.tsx}": "yarn eslint --fix"
|
"*{.js,.jsx,.ts,.tsx}": [
|
||||||
|
"eslint --cache --fix",
|
||||||
|
"prettier --cache --write --ignore-unknown"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue