Skip to content

Commit 790f6d7

Browse files
authored
Switch to using eslint in CI (#15028)
1 parent ccaa7bb commit 790f6d7

File tree

4 files changed

+16
-20
lines changed

4 files changed

+16
-20
lines changed

.github/workflows/insiders.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,11 @@ jobs:
7878
- name: Check dependencies
7979
run: npm run checkDependencies
8080

81-
# TODO: Uncomment once we are ready to rely on eslint.
82-
# - name: Run linting on TypeScript code
83-
# run: npm run lint
81+
- name: Run linting on TypeScript code
82+
run: npm run lint
8483

85-
- name: Run prettier on TypeScript code
86-
run: npx prettier 'src/**/*.ts*' --check
87-
88-
- name: Run prettier on JavaScript code
89-
run: npx prettier 'build/**/*.js' --check
84+
- name: Run formatting on TypeScript code
85+
run: npm run format-check
9086

9187
- name: Use Python ${{env.PYTHON_VERSION}}
9288
uses: actions/setup-python@v2

.github/workflows/pr-check.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -78,15 +78,11 @@ jobs:
7878
- name: Check dependencies
7979
run: npm run checkDependencies
8080

81-
# TODO: Uncomment once we are ready to rely on eslint.
82-
# - name: Run linting on TypeScript code
83-
# run: npm run lint
81+
- name: Run linting on TypeScript code
82+
run: npm run lint
8483

85-
- name: Run prettier on TypeScript code
86-
run: npx prettier 'src/**/*.ts*' --check
87-
88-
- name: Run prettier on JavaScript code
89-
run: npx prettier 'build/**/*.js' --check
84+
- name: Run formatting on TypeScript code
85+
run: npm run format-check
9086

9187
- name: Use Python ${{env.PYTHON_VERSION}}
9288
uses: actions/setup-python@v2

.github/workflows/release.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,11 @@ jobs:
7878
- name: Check dependencies
7979
run: npm run checkDependencies
8080

81-
# TODO: Uncomment once we are ready to rely on eslint.
82-
# - name: Run linting on TypeScript code
83-
# run: npm run lint
81+
- name: Run linting on TypeScript code
82+
run: npm run lint
83+
84+
- name: Run formatting on TypeScript code
85+
run: npm run format-check
8486

8587
### Non-smoke tests
8688
tests:

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1977,7 +1977,9 @@
19771977
"testInsiders": "cross-env VSC_PYTHON_CI_TEST_VSC_CHANNEL=insiders INSTALL_PYLANCE_EXTENSION=true TEST_FILES_SUFFIX=insiders.test CODE_TESTS_WORKSPACE=src/testMultiRootWkspc/smokeTests \"node ./out/test/standardTest.js\"",
19781978
"lint-staged": "node gulpfile.js",
19791979
"lint": "eslint --ext .ts,.tsx src",
1980-
"prettier-fix": "prettier 'src/**/*.ts*' --write && prettier 'build/**/*.js' --write",
1980+
"lint-fix": "eslint --fix --ext .ts,.tsx src",
1981+
"format-check": "prettier 'src/**/*.ts*' --check && prettier 'build/**/*.js' --check",
1982+
"format-fix": "prettier 'src/**/*.ts*' --write && prettier 'build/**/*.js' --write",
19811983
"clean": "gulp clean",
19821984
"addExtensionDependencies": "gulp addExtensionDependencies",
19831985
"updateBuildNumber": "gulp updateBuildNumber",

0 commit comments

Comments
 (0)