diff --git a/.circleci/config.yml b/.circleci/config.yml index 7a083b54..1ac0fa57 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -168,6 +168,9 @@ jobs: - run: name: Eslint command: pnpm eslint:ci + - run: + name: Stylelint + command: pnpm stylelint - run: name: Lint JSON command: pnpm jsonlint diff --git a/.stylelintrc.js b/.stylelintrc.js deleted file mode 100644 index 7ace64b1..00000000 --- a/.stylelintrc.js +++ /dev/null @@ -1,5 +0,0 @@ -const baseline = require('@mui/monorepo/.stylelintrc'); - -module.exports = { - ...baseline, -}; diff --git a/package.json b/package.json index 700d5ec8..2ef89536 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "jsonlint": "node ./scripts/jsonlint.mjs", "eslint": "eslint . --cache --report-unused-disable-directives --ext .js,.ts,.tsx --max-warnings 0", "eslint:ci": "eslint . --report-unused-disable-directives --ext .js,.ts,.tsx --max-warnings 0", - "stylelint": "stylelint --reportInvalidScopeDisables --reportNeedlessDisables \"docs/**/*.{js,ts,tsx}\"", + "stylelint": "stylelint --reportInvalidScopeDisables --reportNeedlessDisables \"{docs,examples,app}/**/*.{js,ts,tsx}\" --ignore-path .gitignore", "markdownlint": "markdownlint-cli2 \"**/*.md\"", "prettier": "pretty-quick --ignore-path .eslintignore", "prettier:all": "prettier --write . --ignore-path .eslintignore", diff --git a/stylelint.config.js b/stylelint.config.js new file mode 100644 index 00000000..6006fbe4 --- /dev/null +++ b/stylelint.config.js @@ -0,0 +1,12 @@ +// TODO move to ESM +const baseline = require('@mui/monorepo/.stylelintrc'); + +// TODO remove. In theory, deleting these lines should just work. +delete baseline.rules['declaration-colon-newline-after']; +delete baseline.rules['function-parentheses-newline-inside']; +delete baseline.rules['no-missing-end-of-source-newline']; +delete baseline.rules['value-list-comma-newline-after']; + +module.exports = { + ...baseline, +};