forked from metabase/metabase
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlint-staged.config.cjs
More file actions
42 lines (42 loc) · 1.52 KB
/
lint-staged.config.cjs
File metadata and controls
42 lines (42 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
module.exports = {
"+(frontend|enterprise)/**/*.styled.tsx": [
"stylelint --customSyntax postcss-styled-syntax --fix",
],
"+(frontend|enterprise/frontend|e2e)/**/*.css": [
"stylelint --fix",
"prettier --write",
],
"+(frontend|enterprise/frontend)/**/*.{js,jsx,ts,tsx}": [
"cross-env LINT_CSS_MODULES=true eslint --max-warnings 0 --fix",
"prettier --write",
"node ./bin/verify-doc-links",
],
"e2e/**/!(cypress_sample_instance_data).{js,jsx,ts,jsx}": [
"eslint --max-warnings 0 --fix",
"prettier --write",
],
"**/*.{clj,cljc,cljs,bb}": [
"./bin/mage cljfmt-files",
"./bin/mage fix-unused-requires",
],
"e2e/test/scenarios/*/{*.(js|ts),!(helpers|shared)/*.(js|ts)}": [
"node e2e/validate-e2e-test-files.js",
],
"enterprise/frontend/src/embedding-sdk-package/README.md": [
"prettier --write",
],
"+(.storybook|enterprise/frontend/src/embedding-sdk-shared/.storybook)/**/*.{js,jsx,ts,tsx,css}":
["prettier --write"],
"**/*": [
/**
* Run mage token-scan for each staged file individually.
* lint-staged passes staged file paths as an array, but executing the command
* once per file avoids shell parsing issues with paths containing spaces or
* special characters (e.g. parentheses), and keeps the invocation explicit.
*/
(files) =>
`./bin/mage -token-scan ${files.map((item) => `"${item}"`).join(" ")}`,
// TODO (Bryan 12/12/25) -- reenable this when we can completely verify correctness
"./bin/mage -uninstall-merge-drivers",
],
};