Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: create a private package for shared eslint configs #11240

Merged
merged 10 commits into from
Jan 13, 2025
1 change: 1 addition & 0 deletions .github/scripts/addCalcitePackageLabel.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ module.exports = async ({ github, context }) => {
github,
context,
label: package,
// eslint-disable-next-line @cspell/spellchecker -- hex color
color: "BFBEAF",
description: `Issues specific to the @esri/${package} package.`,
});
Expand Down
36 changes: 18 additions & 18 deletions .github/scripts/eslint.config.cjs
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
const cspellPlugin = require("@cspell/eslint-plugin");
const eslint = require("@eslint/js");
const globals = require("globals");
const eslint = require("@eslint/js");
const tseslint = require("typescript-eslint");
const cspellPlugin = require("@cspell/eslint-plugin");

module.exports = [
eslint.configs.recommended,
{
files: ["**/*.{c,m,}js"],
plugins: { "@cspell": cspellPlugin },
module.exports = tseslint.config({
files: ["**/*.{c,m,}js"],
extends: [eslint.configs.recommended, tseslint.configs.recommended],
plugins: { "@cspell": cspellPlugin },

languageOptions: {
ecmaVersion: 2021,
sourceType: "commonjs",
globals: {
...globals.node,
},
languageOptions: {
ecmaVersion: 2021,
sourceType: "commonjs",
globals: {
...globals.node,
},
},

rules: {
"comma-dangle": "off",
"@cspell/spellchecker": ["warn", {}],
},
rules: {
"comma-dangle": "off",
"@cspell/spellchecker": ["warn", {}],
"@typescript-eslint/no-require-imports": "off",
},
];
});
2 changes: 1 addition & 1 deletion .github/scripts/omitPrFromChangelog.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@ module.exports = async ({ github, context }) => {
body: newPullRequestBody,
});
} else {
console.log(`The \`no changleog entry\` label is not present on this PR.`);
console.log(`The \`no changelog entry\` label is not present on this PR.`);
}
};
2 changes: 1 addition & 1 deletion .github/scripts/trackMilestoneEstimates.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ module.exports = async ({ github, context, core }) => {
};

const issues = await github.paginate(github.rest.issues.listForRepo, {
// @ts-ignore milestone.number is valid: https://docs.github.com/en/rest/issues/issues#list-repository-issues--parameters
// @ts-expect-error milestone.number is valid: https://docs.github.com/en/rest/issues/issues#list-repository-issues--parameters
milestone: milestone.number,
owner: owner,
repo: repo,
Expand Down
2 changes: 1 addition & 1 deletion .lintstagedrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
"*.{json,html,yml}": ["prettier --write"],
"*.scss": ["stylelint --fix", "prettier --write"],
"*.{s,}css": ["stylelint --fix", "prettier --write"],
"*.md": ["prettier --write", "markdownlint --fix"],
};
28 changes: 8 additions & 20 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
"build": "turbo run build --log-order=stream",
"clean": "turbo run clean --log-order=stream && git clean -fd",
"lint": "concurrently \"npm:lint:*\" \"turbo run lint --log-order=stream\"",
"lint:md": "prettier --write \"**/*.md\" >/dev/null && markdownlint \"{,documentation}/*.md\" --fix --dot --ignore-path .gitignore",
"lint:md": "prettier --write \"*.md\" >/dev/null && markdownlint --fix \"*.md\"",
"lint:yml": "prettier --write \".github/**/*.yml\" >/dev/null",
"lint:js": "eslint -c .github/scripts/eslint.config.cjs --fix .github/scripts/ && prettier --write \".github/**/*.{c,m,}js\" >/dev/null",
"lint:json": "prettier --write \"*.json\" >/dev/null",
"lint:json": "prettier --write \"{.vscode,}/*.json\" >/dev/null",
"version:latest": "./support/release.sh version",
"publish:latest": "./support/release.sh publish",
"version:next": "./support/release.sh version next",
Expand All @@ -39,8 +39,6 @@
"@cspell/dict-pokemon": "1.0.0",
"@cspell/dict-scientific-terms-us": "3.0.5",
"@cspell/eslint-plugin": "8.17.1",
"@eslint/compat": "1.2.4",
"@eslint/eslintrc": "3.2.0",
"@eslint/js": "9.17.0",
"@esri/calcite-base": "1.2.0",
"@octokit/webhooks-types": "7.6.1",
Expand Down
Loading
Loading