Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
EliSchleifer committed Feb 27, 2024
1 parent b699f91 commit 71b9a83
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 26 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ jobs:
- name: Check Licenses
run: node Makefile checkLicenses

- name: Lint Docs JS Files
run: node Makefile lintDocsJS

- name: Check Rule Examples
run: node Makefile checkRuleExamples

Expand Down
25 changes: 13 additions & 12 deletions .trunk/trunk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
# To learn more about the format of this file, see https://docs.trunk.io/reference/trunk-yaml
version: 0.1
cli:
version: 1.19.0
version: 1.20.1
# Trunk provides extensibility via plugins. (https://docs.trunk.io/plugins)
plugins:
sources:
- id: trunk
uri: https://github.com/trunk-io/plugins
ref: v1.4.2
ref: v1.4.3

# Many linters and tools depend on runtimes - configure them here. (https://docs.trunk.io/runtimes)
runtimes:
Expand All @@ -18,7 +18,7 @@ runtimes:
- python@3.10.8
tools:
enabled:
- gh@2.42.1
- gh@2.44.1
runtimes: [node]

# This is the section where you manage your linters. (https://docs.trunk.io/check/configuration)
Expand All @@ -30,31 +30,32 @@ lint:
run: ${workspace}/bin/eslint.js --output-file ${tmpfile} --format json ${target}
enabled:
- eslint
- actionlint@1.6.26
- checkov@3.2.0
- actionlint@1.6.27
- checkov@3.2.26
- git-diff-check
- markdownlint@0.39.0
- oxipng@9.0.0
- prettier@3.2.4
- renovate@37.154.0
- prettier@3.2.5
- renovate@37.214.0
- shellcheck@0.9.0
- shfmt@3.6.0
- svgo@3.2.0
- trivy@0.48.3
- trufflehog@3.65.0
- yamllint@1.33.0
- trivy@0.49.1
- trufflehog@3.68.2
- yamllint@1.35.1
ignore:
- linters: [markdownlint]
paths:
- CHANGELOG.md
- linters: [eslint]
when: [lsp, monitor, cli]
# In order to successfully lint JavaScript files in the `docs` directory, dependencies declared in `docs/package.json`
# would have to be installed in `docs/node_modules`. In particular, eslint-plugin-node rules examine `docs/node_modules`
# when analyzing `require()` calls from CJS modules in the `docs` directory. Since our release process does not run `npm install`
# in the `docs` directory, linting would fail and break the release. Also, working on the main `eslint` package does not require
# installing dependencies declared in `docs/package.json`, so most contributors will not have `docs/node_modules` locally.
# Therefore, default check doesn't run on "docs/**" as ignored in trunk.yaml
# There is a separate command `lint:docs` which will force linteing for JavaScript files in the `docs` directory.
# Therefore, default check when running under LSP, monitor or cli will ignore "docs/**"
# When running under CI - these paths will be included
paths:
- docs/**
- linters: [prettier]
Expand Down
11 changes: 0 additions & 11 deletions Makefile.js
Original file line number Diff line number Diff line change
Expand Up @@ -430,17 +430,6 @@ function getBinFile(command) {
// Tasks
//------------------------------------------------------------------------------

target.lintDocsJS = function([fix = false, ci = false] = []) {
echo("Validating JavaScript files in the docs directory");
const lastReturn = exec(
`${getBinFile("trunk")} check --filter=eslint --force ${fix ? "--fix" : ""} ${ci ? "--ci" : ""} docs`
);

if (lastReturn.code !== 0) {
exit(1);
}
};

target.fuzz = function({ amount = 1000, fuzzBrokenAutofixes = false } = {}) {
const fuzzerRunner = require("./tools/fuzzer-runner");
const fuzzResults = fuzzerRunner.run({ amount, fuzzBrokenAutofixes });
Expand Down

0 comments on commit 71b9a83

Please sign in to comment.