mirror of
https://github.com/selfxyz/self.git
synced 2026-01-09 14:48:06 -05:00
speed up prettier and eslint (#1295)
* speed up prettier and eslint * throw error * turn off
This commit is contained in:
@@ -34,24 +34,6 @@ module.exports = {
|
|||||||
],
|
],
|
||||||
settings: {
|
settings: {
|
||||||
react: { version: 'detect' },
|
react: { version: 'detect' },
|
||||||
'import/resolver': {
|
|
||||||
typescript: {
|
|
||||||
alwaysTryTypes: true,
|
|
||||||
project: './tsconfig.json',
|
|
||||||
extensions: [
|
|
||||||
'.ts',
|
|
||||||
'.tsx',
|
|
||||||
'.native.ts',
|
|
||||||
'.native.tsx',
|
|
||||||
'.web.ts',
|
|
||||||
'.web.tsx',
|
|
||||||
'.ios.ts',
|
|
||||||
'.ios.tsx',
|
|
||||||
'.android.ts',
|
|
||||||
'.android.tsx',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
'import/ignore': ['react-native'],
|
'import/ignore': ['react-native'],
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
@@ -169,7 +151,7 @@ module.exports = {
|
|||||||
'@typescript-eslint/no-namespace': 'off',
|
'@typescript-eslint/no-namespace': 'off',
|
||||||
'no-case-declarations': 'off',
|
'no-case-declarations': 'off',
|
||||||
'react/no-children-prop': 'off',
|
'react/no-children-prop': 'off',
|
||||||
'import/no-unresolved': 'error',
|
'import/no-unresolved': 'off', // TypeScript handles this
|
||||||
'@typescript-eslint/ban-ts-comment': 'off',
|
'@typescript-eslint/ban-ts-comment': 'off',
|
||||||
'no-empty': 'off',
|
'no-empty': 'off',
|
||||||
|
|
||||||
@@ -188,6 +170,14 @@ module.exports = {
|
|||||||
'@typescript-eslint/indent': 'off',
|
'@typescript-eslint/indent': 'off',
|
||||||
},
|
},
|
||||||
overrides: [
|
overrides: [
|
||||||
|
{
|
||||||
|
// Enable TypeScript project service for source files for faster parsing
|
||||||
|
files: ['src/**/*.{ts,tsx}'],
|
||||||
|
parserOptions: {
|
||||||
|
project: true,
|
||||||
|
EXPERIMENTAL_useProjectService: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
files: ['docs/examples/**/*.ts'],
|
files: ['docs/examples/**/*.ts'],
|
||||||
rules: {
|
rules: {
|
||||||
@@ -218,6 +208,7 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
parserOptions: {
|
parserOptions: {
|
||||||
project: './tsconfig.test.json',
|
project: './tsconfig.test.json',
|
||||||
|
EXPERIMENTAL_useProjectService: true,
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
// Allow console logging and relaxed typing in tests
|
// Allow console logging and relaxed typing in tests
|
||||||
|
|||||||
6
app/.gitignore
vendored
6
app/.gitignore
vendored
@@ -74,6 +74,12 @@ yarn-error.log
|
|||||||
# testing
|
# testing
|
||||||
/coverage
|
/coverage
|
||||||
|
|
||||||
|
# linting cache
|
||||||
|
.eslintcache
|
||||||
|
|
||||||
|
# prettier cache
|
||||||
|
.cache/
|
||||||
|
|
||||||
.env
|
.env
|
||||||
**/Pods/
|
**/Pods/
|
||||||
|
|
||||||
|
|||||||
@@ -24,8 +24,8 @@
|
|||||||
"clean:xcode": "rm -rf ~/Library/Developer/Xcode/DerivedData",
|
"clean:xcode": "rm -rf ~/Library/Developer/Xcode/DerivedData",
|
||||||
"clean:xcode-env-local": "rm -f ios/.xcode.env.local",
|
"clean:xcode-env-local": "rm -f ios/.xcode.env.local",
|
||||||
"find:type-imports": "node scripts/find-type-import-issues.mjs",
|
"find:type-imports": "node scripts/find-type-import-issues.mjs",
|
||||||
"fmt": "yarn prettier --check .",
|
"fmt": "yarn prettier --check --cache .",
|
||||||
"fmt:fix": "yarn prettier --write .",
|
"fmt:fix": "yarn prettier --write --cache .",
|
||||||
"format": "yarn nice",
|
"format": "yarn nice",
|
||||||
"ia": "yarn install-app",
|
"ia": "yarn install-app",
|
||||||
"imports:fix": "node ./scripts/alias-imports.cjs",
|
"imports:fix": "node ./scripts/alias-imports.cjs",
|
||||||
@@ -34,8 +34,8 @@
|
|||||||
"install-app:setup": "yarn install && yarn build:deps && yarn setup:android-deps && cd ios && bundle install && scripts/pod-install-with-cache-fix.sh && cd ..",
|
"install-app:setup": "yarn install && yarn build:deps && yarn setup:android-deps && cd ios && bundle install && scripts/pod-install-with-cache-fix.sh && cd ..",
|
||||||
"ios": "yarn build:deps && node scripts/run-ios-simulator.cjs",
|
"ios": "yarn build:deps && node scripts/run-ios-simulator.cjs",
|
||||||
"ios:fastlane-debug": "yarn reinstall && bundle exec fastlane --verbose ios internal_test",
|
"ios:fastlane-debug": "yarn reinstall && bundle exec fastlane --verbose ios internal_test",
|
||||||
"lint": "eslint .",
|
"lint": "eslint . --cache --cache-location .eslintcache",
|
||||||
"lint:fix": "eslint --fix .",
|
"lint:fix": "eslint --fix . --cache --cache-location .eslintcache",
|
||||||
"mobile-deploy": "node scripts/mobile-deploy-confirm.cjs both",
|
"mobile-deploy": "node scripts/mobile-deploy-confirm.cjs both",
|
||||||
"mobile-deploy:android": "node scripts/mobile-deploy-confirm.cjs android",
|
"mobile-deploy:android": "node scripts/mobile-deploy-confirm.cjs android",
|
||||||
"mobile-deploy:ios": "node scripts/mobile-deploy-confirm.cjs ios",
|
"mobile-deploy:ios": "node scripts/mobile-deploy-confirm.cjs ios",
|
||||||
|
|||||||
Reference in New Issue
Block a user