Skip to content

Commit d60928d

Browse files
committed
Fix Playwright project lint and run PFC
1 parent 77d82bd commit d60928d

6 files changed

Lines changed: 101 additions & 3 deletions

File tree

cmd/ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,4 +122,4 @@
122122
"msw": {
123123
"workerDirectory": "public"
124124
}
125-
}
125+
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,4 @@
5050
"vitest/vite": "7.3.2",
5151
"vite-node/vite": "7.3.2"
5252
}
53-
}
53+
}

packages/go/stbernard/command/license/internal/cmd.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ func Run(env environment.Environment, args Args) error {
5151
"justfile",
5252
filepath.Join("cmd", "api", "src", "api", "static", "assets"),
5353
filepath.Join("cmd", "api", "src", "cmd", "testidp", "samlidp"),
54+
filepath.Join("cmd", "ui", "playwright"),
5455
}
5556
disallowedExtensions = []string{".zip", ".example", ".git", ".gitignore", ".gitattributes", ".png", ".mdx", ".iml", ".g4", ".sum", ".bazel", ".bzl", ".typed", ".md", ".json", ".template", "sha256", ".pyc", ".gif", ".tiff", ".lock", ".txt", ".png", ".jpg", ".jpeg", ".ico", ".gz", ".tar", ".woff", ".woff2", ".header", ".pro", ".cert", ".crt", ".key", ".example", ".sha256", ".actrc", ".all-contributorsrc", ".editorconfig", ".conf", ".dockerignore", ".prettierrc", ".lintstagedrc", ".webp", ".bak", ".java", ".interp", ".tokens", "justfile", "pgpass", "LICENSE"}
5657
now = time.Now()
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
// Copyright 2026 Specter Ops, Inc.
2+
//
3+
// Licensed under the Apache License, Version 2.0
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
//
15+
// SPDX-License-Identifier: Apache-2.0
16+
const {
17+
defineConfig,
18+
globalIgnores,
19+
} = require("eslint/config");
20+
21+
const globals = require("globals");
22+
23+
const {
24+
fixupConfigRules,
25+
} = require("@eslint/compat");
26+
27+
const tsParser = require("@typescript-eslint/parser");
28+
const sxProps = require("eslint-plugin-sx-props");
29+
const js = require("@eslint/js");
30+
31+
const {
32+
FlatCompat,
33+
} = require("@eslint/eslintrc");
34+
35+
const compat = new FlatCompat({
36+
baseDirectory: __dirname,
37+
recommendedConfig: js.configs.recommended,
38+
allConfig: js.configs.all
39+
});
40+
41+
module.exports = defineConfig([{
42+
languageOptions: {
43+
globals: {
44+
...globals.browser,
45+
},
46+
47+
parser: tsParser,
48+
ecmaVersion: "latest",
49+
sourceType: "module",
50+
parserOptions: {},
51+
},
52+
53+
extends: fixupConfigRules(compat.extends(
54+
"eslint:recommended",
55+
"plugin:@typescript-eslint/recommended",
56+
"plugin:react/recommended",
57+
"plugin:react/jsx-runtime",
58+
"plugin:react-hooks/recommended",
59+
"plugin:jsx-a11y/recommended",
60+
"prettier",
61+
)),
62+
63+
plugins: {
64+
"sx-props": sxProps,
65+
},
66+
67+
rules: {
68+
"@typescript-eslint/ban-ts-comment": "off",
69+
"@typescript-eslint/no-non-null-assertion": "off",
70+
"@typescript-eslint/no-explicit-any": "off",
71+
"@typescript-eslint/no-inferrable-types": "off",
72+
"@typescript-eslint/no-empty-function": "off",
73+
74+
"@typescript-eslint/no-unused-vars": ["error", {
75+
ignoreRestSiblings: true,
76+
}],
77+
78+
"react/prop-types": "off",
79+
"react/no-unescaped-entities": "off",
80+
"jsx-a11y/no-autofocus": "off",
81+
"sx-props/no-sx-props": "error",
82+
},
83+
84+
settings: {
85+
react: {
86+
version: "detect",
87+
},
88+
},
89+
}, globalIgnores(["**/rollup.config.js"])]);

packages/javascript/bh-playwright-testing/package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"scripts": {
77
"test": "echo \"No tests for bh-playwright-testing\"",
88
"check-types": "tsc --noEmit --pretty",
9-
"lint": "yarn check-types",
9+
"lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
1010
"format": "prettier --write \"src/**/*.@(ts|md|json)\"",
1111
"check-format": "prettier --list-different \"src/**/*.@(ts|md|json)\""
1212
},
@@ -19,10 +19,14 @@
1919
},
2020
"devDependencies": {
2121
"@axe-core/playwright": "^4.11.3",
22+
"@eslint/eslintrc": "^3.3.5",
23+
"@eslint/js": "^10.0.1",
2224
"@playwright/test": "^1.59.1",
2325
"allure-playwright": "^3.4.3",
2426
"axe-core": "^4.11.4",
2527
"dotenv": "^17.4.2",
28+
"eslint": "^9.26.0",
29+
"eslint-config-prettier": "^9.1.0",
2630
"playwright-core": "^1.59.1",
2731
"prettier": "^3.2.5",
2832
"typescript": "^5.9.3"

yarn.lock

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6864,10 +6864,14 @@ __metadata:
68646864
resolution: "bh-playwright-testing@workspace:packages/javascript/bh-playwright-testing"
68656865
dependencies:
68666866
"@axe-core/playwright": "npm:^4.11.3"
6867+
"@eslint/eslintrc": "npm:^3.3.5"
6868+
"@eslint/js": "npm:^10.0.1"
68676869
"@playwright/test": "npm:^1.59.1"
68686870
allure-playwright: "npm:^3.4.3"
68696871
axe-core: "npm:^4.11.4"
68706872
dotenv: "npm:^17.4.2"
6873+
eslint: "npm:^9.26.0"
6874+
eslint-config-prettier: "npm:^9.1.0"
68716875
playwright-core: "npm:^1.59.1"
68726876
prettier: "npm:^3.2.5"
68736877
typescript: "npm:^5.9.3"

0 commit comments

Comments
 (0)