-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The main goal of this change is to add linting for the `config` package. While doing this I wanted to take the chance and add a few more things: 1. Root `Makefile` for root operations `install` and `clean` for easy cleaning and reinstallation of dependencies 2. Add rule `import/no-extraneous-dependencies` to error in case we make use of a module without installing it beforehand. This caused some issues already and a first fix was added with #3381. But also here I have to install `glob` as it wasn't listed in the config's dependency list, but is imported in [packages/config/scripts/ci.cjs#L1](https://github.com/kumahq/kuma-gui/blob/36911e6e113bdf823e98233d2eac4543acb588b4/packages/config/scripts/ci.cjs#L1). 3. Linting of staged files in `packages/config` 4. Auto-fixing some linting issues that got revealed after adding the linter here 5. A typo I found --------- Signed-off-by: schogges <[email protected]>
- Loading branch information
Showing
12 changed files
with
78 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
SHELL := /usr/bin/env bash | ||
MK := ./packages/kuma-gui/mk | ||
|
||
include $(MK)/install.mk | ||
include $(MK)/check.mk | ||
|
||
.PHONY: clean | ||
clean: .clean ## Dev: Remove all `node_modules` recursively | ||
|
||
.PHONY: install | ||
install: .install ## Dev: Install all dependencies |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"*.{cjs,js,ts}": "make lint" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
MK := ../kuma-gui/mk | ||
|
||
include $(MK)/check.mk | ||
|
||
.PHONY: lint | ||
lint: .lint/script ## Dev: Run all lint script checks (js,ts) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/** @typedef {import('eslint').Linter.Config[]} Config */ | ||
|
||
const { eslint } = require('./src/index.cjs') | ||
|
||
const config = [ | ||
...eslint({}), | ||
] | ||
|
||
module.exports = config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,5 +32,5 @@ function shuffleArray(array) { | |
} | ||
|
||
module.exports = { | ||
getPartitionedTestFiles | ||
getPartitionedTestFiles, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,4 +23,4 @@ function createStylelintConfig() { | |
|
||
module.exports = { | ||
createStylelintConfig, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters