Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerJang27 committed May 8, 2024
1 parent 01f3820 commit 2fa6e8a
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .trunk/trunk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ plugins:

lint:
enabled:
# enabled linters inherited from github.com/trunk-io/configs plugin
# enabled linters inherited from github.com/trunk-io/configs plugin
- eslint@9.2.0
disabled:
- pylint # pylint diagnostics are too strict
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ trunk check enable {linter}
| HAML | [haml-lint] |
| HTML Templates | [djlint] |
| Java | [google-java-format], [pmd], [semgrep] |
| Javascript | [biome], [deno], [eslint], [prettier], [rome], [semgrep] |
| JSON | [biome], [deno], [eslint], [prettier], [semgrep] |
| Javascript | [biome], [deno], [eslint], [prettier], [rome], [semgrep] |
| JSON | [biome], [deno], [eslint], [prettier], [semgrep] |
| Kotlin | [detekt], [ktlint] |
| Kubernetes | [kube-linter] |
| Lua | [stylua] |
Expand All @@ -85,7 +85,7 @@ trunk check enable {linter}
| Terragrunt | [terragrunt] |
| Textproto | [txtpbfmt] |
| TOML | [taplo] |
| Typescript | [deno], [eslint], [prettier], [rome], [semgrep] |
| Typescript | [deno], [eslint], [prettier], [rome], [semgrep] |
| YAML | [prettier], [semgrep], [yamllint] |

[actionlint]: https://trunk.io/linters/infra/actionlint
Expand Down
2 changes: 1 addition & 1 deletion actions/npm-check/npm_check.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ npmCheck({})
message: `${uninstalled_count} npm ${pluralize(
uninstalled_count,
"package",
"packages"
"packages",
)} ${pluralize(uninstalled_count, "needs", "need")} to be installed\n`,
commands: [{ run: "npm install", title: "npm install" }],
icon: iconPath,
Expand Down
2 changes: 1 addition & 1 deletion actions/yarn-check/yarn_check.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ yarnCheck({})
message: `${uninstalled_count} yarn ${pluralize(
uninstalled_count,
"package",
"packages"
"packages",
)} ${pluralize(uninstalled_count, "needs", "need")} to be installed\n`,
commands: [{ run: "yarn install", title: "yarn install" }],
icon: iconPath,
Expand Down
3 changes: 1 addition & 2 deletions eslint.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ const simpleImportSort = require("eslint-plugin-simple-import-sort");
module.exports = [
eslint.configs.recommended,
prettier,
...typescriptEslint.config(
{
...typescriptEslint.config({
files: ["**/*.ts"],
extends: [
...typescriptEslint.configs.recommended,
Expand Down
6 changes: 4 additions & 2 deletions linters/eslint/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@

## Configuration Notice

`eslint@9.x` requires a flat config format (see their [migration guide](https://eslint.org/docs/latest/use/migrate-to-9.0.0#flat-config))
in order to run. Trunk will automatically detect which config file you have and by default will only enable a compatible version.
`eslint@9.x` requires a flat config format (see their
[migration guide](https://eslint.org/docs/latest/use/migrate-to-9.0.0#flat-config)) in order to run.
Trunk will automatically detect which config file you have and by default will only enable a
compatible version.
2 changes: 1 addition & 1 deletion linters/eslint/eslint.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const preCheck = (driver: TrunkLintDriver) => {
driver.moveFile(path.join(TEST_DATA, file), file.replace("-old", ""));
});
}
}
};

const preCheckWithInstall = (driver: TrunkLintDriver) => {
preCheck(driver);
Expand Down

0 comments on commit 2fa6e8a

Please sign in to comment.