Skip to content

Commit 4e6510c

Browse files
authored
chore: allow prettier to warn and format in time and during project build (#1580)
Signed-off-by: Dominik Jelinek <[email protected]>
1 parent 2e971c4 commit 4e6510c

File tree

8 files changed

+91
-4
lines changed

8 files changed

+91
-4
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<a href="https://github.com/redhat-developer/vscode-extension-tester/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-Apache%202-yellow.svg?style=for-the-badge&logo=appveyor" alt="License"/></a>
1010
</br>
1111
<a href="https://code.visualstudio.com"><img src="https://img.shields.io/badge/VS_Code-1.94.x-blue?style=for-the-badge&logo=visualstudiocode" alt="Maximal supported version of VS Code"></a>
12+
<a href="https://github.com/prettier/prettier"><img src="https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=for-the-badge" alt="Code styled by Prettier"></a>
1213
<a href="https://github.com/redhat-developer/vscode-extension-tester/actions/workflows/main.yml"><img src="https://img.shields.io/github/actions/workflow/status/redhat-developer/vscode-extension-tester/main.yml?label=Main%20CI&style=for-the-badge&logo=githubactions" alt="Main CI"></a>
1314
<a href="https://github.com/redhat-developer/vscode-extension-tester/actions/workflows/insiders.yml"><img src="https://img.shields.io/github/actions/workflow/status/redhat-developer/vscode-extension-tester/insiders.yml?branch=main&label=Insider%20CI&style=for-the-badge&logo=githubactions" alt="Insider CI"></a>
1415
</p><br/>

eslint.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ import { defineConfig } from 'eslint-define-config';
44
import ts from '@typescript-eslint/parser';
55
import tsEslint from '@typescript-eslint/eslint-plugin';
66
import stylisticEslint from '@stylistic/eslint-plugin';
7+
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
78

89
export default defineConfig([
910
{
1011
ignores: ['**/*.test.js'],
1112
},
13+
eslintPluginPrettierRecommended,
1214
{
1315
files: ['**/*.ts', '**/*.tsx'],
1416
languageOptions: {
@@ -61,6 +63,7 @@ export default defineConfig([
6163
eqeqeq: ['warn', 'always'],
6264
'no-redeclare': 'warn',
6365
'no-throw-literal': 'warn',
66+
'prettier/prettier': ['warn'],
6467
},
6568
},
6669
]);

package-lock.json

Lines changed: 82 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"eslint": "^9.13.0",
3939
"eslint-config-prettier": "^9.1.0",
4040
"eslint-define-config": "^2.1.0",
41+
"eslint-plugin-prettier": "^5.2.1",
4142
"lerna": "^8.1.8",
4243
"prettier": "3.3.3",
4344
"rimraf": "^6.0.1",

packages/extester/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"prepack": "npm run build",
1818
"build": "npm run clean && npm run compile && chmod a+x ./out/cli.js",
1919
"compile": "tsc -p ./ && npm run lint",
20-
"lint": "eslint src",
20+
"lint": "eslint --fix --fix-type layout src",
2121
"clean": "rimraf out"
2222
},
2323
"author": "Red Hat",

packages/locators/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"prepack": "npm run build",
3434
"build": "npm run clean && npm run compile",
3535
"compile": "tsc -p ./ && npm run lint",
36-
"lint": "eslint lib",
36+
"lint": "eslint --fix --fix-type layout lib",
3737
"clean": "rimraf out"
3838
},
3939
"peerDependencies": {

packages/page-objects/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"prepack": "npm run build",
1313
"build": "npm run clean && npm run compile",
1414
"compile": "tsc -p ./ && npm run lint",
15-
"lint": "eslint src",
15+
"lint": "eslint --fix --fix-type layout src",
1616
"clean": "rimraf out"
1717
},
1818
"author": "Red Hat",

tests/test-project/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@
213213
"clean": "rimraf out",
214214
"watch": "tsc -watch -p ./",
215215
"compile": "tsc -p ./ && npm run lint",
216-
"lint": "eslint src",
216+
"lint": "eslint --fix --fix-type layout src",
217217
"cb-init": "echo hello_ExTester | clipboard",
218218
"ui-test": "npm run cb-init && extest setup-and-run './out/test/cli/order-3.test.js' './out/test/cli/order-2.test.js' './out/test/cli/order-1.test.js' './out/test/**/!(clipboard)*.test.js' './out/test/system/clipboard.test.js' -u -i -r . -e ./test-extensions",
219219
"ui-test:coverage": "MOCHA_GREP='order|clipboard|ExtensionsView|TitleBar' MOCHA_INVERT=true extest setup-and-run './out/test/**/*.test.js' -i -r . -e ./test-extensions --coverage"

0 commit comments

Comments
 (0)