mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-29 06:33:40 -05:00
[web] Add TypeScript file extensions to ESLint (#7215)
GitOrigin-RevId: 0e7dbc94b304ba0bb17fbbfbc726e31775b97e3d
This commit is contained in:
parent
f175aef078
commit
755233dcdc
2 changed files with 20 additions and 20 deletions
|
@ -367,17 +367,17 @@ $(WITH_NODE_MODULES_PATH): export PATH=$(NODE_MODULES_PATH)
|
||||||
lint: lint_backend
|
lint: lint_backend
|
||||||
lint_backend:
|
lint_backend:
|
||||||
npx eslint \
|
npx eslint \
|
||||||
app.js \
|
'app.{js,ts,tsx}' \
|
||||||
'app/**/*.js' \
|
'app/**/*.{js,ts,tsx}' \
|
||||||
'modules/*/index.js' \
|
'modules/*/index.{js,ts,tsx}' \
|
||||||
'modules/*/app/**/*.js' \
|
'modules/*/app/**/*.{js,ts,tsx}' \
|
||||||
--max-warnings=0
|
--max-warnings=0
|
||||||
|
|
||||||
lint: lint_frontend
|
lint: lint_frontend
|
||||||
lint_frontend:
|
lint_frontend:
|
||||||
npx eslint \
|
npx eslint \
|
||||||
'frontend/**/*.js' \
|
'frontend/**/*.{js,ts,tsx}' \
|
||||||
'modules/*/frontend/**/*.js' \
|
'modules/**/frontend/**/*.{js,ts,tsx}' \
|
||||||
--max-warnings=0
|
--max-warnings=0
|
||||||
|
|
||||||
lint: lint_test
|
lint: lint_test
|
||||||
|
@ -385,34 +385,34 @@ lint_test: lint_test_app
|
||||||
lint_test_app: lint_test_app_unit
|
lint_test_app: lint_test_app_unit
|
||||||
lint_test_app_unit:
|
lint_test_app_unit:
|
||||||
npx eslint \
|
npx eslint \
|
||||||
'test/unit/**/*.js' \
|
'test/unit/**/*.{js,ts,tsx}' \
|
||||||
--max-warnings=0
|
--max-warnings=0
|
||||||
|
|
||||||
lint_test_app: lint_test_app_rest
|
lint_test_app: lint_test_app_rest
|
||||||
lint_test_app_rest:
|
lint_test_app_rest:
|
||||||
npx eslint \
|
npx eslint \
|
||||||
'test/**/*.js' \
|
'test/**/*.{js,ts,tsx}' \
|
||||||
--ignore-pattern 'test/unit/**/*.js' \
|
--ignore-pattern 'test/unit/**/*.{js,ts,tsx}' \
|
||||||
--max-warnings=0
|
--max-warnings=0
|
||||||
|
|
||||||
lint_test: lint_test_modules
|
lint_test: lint_test_modules
|
||||||
lint_test_modules:
|
lint_test_modules:
|
||||||
npx eslint \
|
npx eslint \
|
||||||
'modules/*/test/**/*.js' \
|
'modules/*/test/**/*.{js,ts,tsx}' \
|
||||||
--max-warnings=0
|
--max-warnings=0
|
||||||
|
|
||||||
lint: lint_misc
|
lint: lint_misc
|
||||||
# migrations, scripts, webpack config, karma config
|
# migrations, scripts, webpack config, karma config
|
||||||
lint_misc:
|
lint_misc:
|
||||||
npx eslint . \
|
npx eslint . \
|
||||||
--ignore-pattern app.js \
|
--ignore-pattern 'app.{js,ts,tsx}' \
|
||||||
--ignore-pattern 'app/**/*.js' \
|
--ignore-pattern 'app/**/*.{js,ts,tsx}' \
|
||||||
--ignore-pattern 'modules/*/app/**/*.js' \
|
--ignore-pattern 'modules/*/app/**/*.{js,ts,tsx}' \
|
||||||
--ignore-pattern 'modules/*/index.js' \
|
--ignore-pattern 'modules/*/index.{js,ts,tsx}' \
|
||||||
--ignore-pattern 'frontend/**/*.js' \
|
--ignore-pattern 'frontend/**/*.{js,ts,tsx}' \
|
||||||
--ignore-pattern 'modules/*/frontend/**/*.js' \
|
--ignore-pattern 'modules/**/frontend/**/*.{js,ts,tsx}' \
|
||||||
--ignore-pattern 'test/**/*.js' \
|
--ignore-pattern 'test/**/*.{js,ts,tsx}' \
|
||||||
--ignore-pattern 'modules/*/test/**/*.js' \
|
--ignore-pattern 'modules/*/test/**/*.{js,ts,tsx}' \
|
||||||
--max-warnings=0
|
--max-warnings=0
|
||||||
|
|
||||||
lint: lint_pug
|
lint: lint_pug
|
||||||
|
|
|
@ -26,8 +26,8 @@
|
||||||
"format:fix": "prettier --write $PWD/'**/*.{js,ts,tsx}'",
|
"format:fix": "prettier --write $PWD/'**/*.{js,ts,tsx}'",
|
||||||
"format:styles": "prettier --list-different $PWD/'**/*.less'",
|
"format:styles": "prettier --list-different $PWD/'**/*.less'",
|
||||||
"format:styles:fix": "prettier --write $PWD/'**/*.less'",
|
"format:styles:fix": "prettier --write $PWD/'**/*.less'",
|
||||||
"lint": "eslint --max-warnings 0 --format unix .",
|
"lint": "eslint --max-warnings 0 --format unix --ext .js,.ts,.tsx .",
|
||||||
"lint:fix": "eslint --fix .",
|
"lint:fix": "eslint --fix --ext .js,.ts,.tsx .",
|
||||||
"type-check": "tsc --noEmit",
|
"type-check": "tsc --noEmit",
|
||||||
"extract-translations": "i18next-scanner",
|
"extract-translations": "i18next-scanner",
|
||||||
"migrations": "east",
|
"migrations": "east",
|
||||||
|
|
Loading…
Reference in a new issue