Skip to content

Commit

Permalink
fix(stylelint): support JavaScript/TypeScript/Markdown files (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
JounQin committed Mar 20, 2022
1 parent 2f9ca19 commit 65d9e3f
Show file tree
Hide file tree
Showing 14 changed files with 864 additions and 889 deletions.
14 changes: 14 additions & 0 deletions .changeset/ninety-singers-taste.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
"@1stg/app-config": patch
"@1stg/babel-preset": patch
"@1stg/common-config": patch
"@1stg/eslint-config": patch
"@1stg/lib-config": patch
"@1stg/lint-staged": patch
"@1stg/markuplint-config": patch
"@1stg/postcss-config": patch
"@1stg/prettier-config": patch
"@1stg/stylelint-config": patch
---

fix(stylelint): support JavaScript/TypeScript/Markdown files
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"check:tslint": "tslint-config-prettier-check ./tslint.json",
"lint": "run-p lint:*",
"lint:es": "eslint . --cache -f friendly",
"lint:style": "stylelint --cache 'tests/*.{css,html,less,scss,svelte,vue}'",
"lint:style": "stylelint --cache 'tests/*.{css,html,js,jsx,less,scss,svelte,ts,tsx,vue}'",
"lint:ts": "tslint -p . -t stylish",
"lint:tsc": "tsc --noEmit",
"postinstall": "patch-package && simple-git-hooks && yarn-deduplicate --strategy fewer || exit 0",
Expand All @@ -25,31 +25,31 @@
"typecov": "type-coverage"
},
"devDependencies": {
"@angular/compiler": "^13.2.5",
"@angular/compiler-cli": "^13.2.5",
"@angular/core": "^13.2.5",
"@angular/compiler": "^13.3.0",
"@angular/compiler-cli": "^13.3.0",
"@angular/core": "^13.3.0",
"@changesets/changelog-github": "^0.4.3",
"@changesets/cli": "^2.21.1",
"@types/jest": "^27.4.1",
"@types/node": "^17.0.21",
"@types/react": "^17.0.39",
"@types/react": "^17.0.41",
"@types/unist": "^2.0.6",
"core-js": "^3.21.1",
"enhanced-resolve": "^5.9.2",
"patch-package": "^6.4.7",
"postcss": "^8.4.7",
"postcss": "^8.4.12",
"react": "^17.0.2",
"rxjs": "^7.5.4",
"rxjs": "^7.5.5",
"svelte": "^3.46.4",
"ts-jest": "^27.1.3",
"tslint": "^6.1.3",
"type-coverage": "^2.21.0",
"type-coverage": "^2.21.1",
"typescript": "^4.6.2",
"vue": "^3.2.31",
"vue-tsc": "^0.32.1"
"vue-tsc": "^0.33.2"
},
"resolutions": {
"prettier": "^2.5.1"
"prettier": "^2.6.0"
},
"typeCoverage": {
"atLeast": 100,
Expand Down
8 changes: 4 additions & 4 deletions packages/app-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
"@1stg/postcss-config": "^2.3.1",
"@1stg/stylelint-config": "^3.1.0",
"@pkgr/es-modules": "^0.5.1",
"@pkgr/imagemin": "^2.1.0",
"browserslist": "^4.19.3",
"postcss": "^8.4.7",
"stylelint": "^14.5.3"
"@pkgr/imagemin": "^3.0.0",
"browserslist": "^4.20.2",
"postcss": "^8.4.12",
"stylelint": "^14.6.0"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-preset/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"dependencies": {
"@babel/helper-plugin-utils": "^7.16.7",
"@babel/plugin-proposal-class-properties": "^7.16.7",
"@babel/plugin-proposal-decorators": "^7.17.2",
"@babel/plugin-proposal-decorators": "^7.17.8",
"@babel/preset-env": "^7.16.11",
"@babel/preset-react": "^7.16.7",
"@babel/preset-typescript": "^7.16.7",
Expand Down
10 changes: 5 additions & 5 deletions packages/common-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
"@1stg/remark-config": "^1.1.0",
"@1stg/simple-git-hooks": "^0.1.2",
"@1stg/tsconfig": "^2.0.1",
"@babel/core": "^7.17.5",
"@commitlint/cli": "^16.2.1",
"eslint": "^8.10.0",
"lint-staged": "^12.3.5",
"@babel/core": "^7.17.8",
"@commitlint/cli": "^16.2.3",
"eslint": "^8.11.0",
"lint-staged": "^12.3.7",
"npm-run-all": "^4.1.5",
"prettier": "^2.5.1",
"prettier": "^2.6.0",
"simple-git-hooks": "^2.7.0",
"tslib": "^2.3.1",
"yarn-deduplicate": "^3.1.0"
Expand Down
16 changes: 8 additions & 8 deletions packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
"@angular-eslint/eslint-plugin-template": "^13.1.0",
"@angular-eslint/template-parser": "^13.1.0",
"@babel/eslint-parser": "^7.17.0",
"@babel/eslint-plugin": "^7.16.5",
"@babel/eslint-plugin": "^7.17.7",
"@pkgr/utils": "^2.0.2",
"@typescript-eslint/eslint-plugin": "^5.13.0",
"@typescript-eslint/eslint-plugin-tslint": "^5.13.0",
"@typescript-eslint/parser": "^5.13.0",
"@typescript-eslint/eslint-plugin": "^5.15.0",
"@typescript-eslint/eslint-plugin-tslint": "^5.15.0",
"@typescript-eslint/parser": "^5.15.0",
"angular-eslint-template-parser": "^0.1.1",
"eslint-config-prettier": "^8.5.0",
"eslint-config-standard": "^16.0.3",
Expand All @@ -31,20 +31,20 @@
"eslint-import-resolver-typescript": "^2.5.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-jest": "^26.1.1",
"eslint-plugin-jsdoc": "^37.9.6",
"eslint-plugin-jest": "^26.1.2",
"eslint-plugin-jsdoc": "^38.0.6",
"eslint-plugin-markup": "^0.8.0",
"eslint-plugin-mdx": "^1.16.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-promise": "^6.0.0",
"eslint-plugin-react": "^7.29.3",
"eslint-plugin-react": "^7.29.4",
"eslint-plugin-react-hooks": "^4.3.0",
"eslint-plugin-simple-import-sort": "^7.0.0",
"eslint-plugin-sonar": "^0.7.1",
"eslint-plugin-sonarjs": "^0.12.0",
"eslint-plugin-svelte": "^1.1.2",
"eslint-plugin-unicorn": "^41.0.0",
"eslint-plugin-unicorn": "^41.0.1",
"eslint-plugin-vue": "^8.5.0"
},
"publishConfig": {
Expand Down
2 changes: 1 addition & 1 deletion packages/lib-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"dependencies": {
"@1stg/common-config": "^3.1.0",
"@pkgr/rollup": "^2.1.1",
"@pkgr/rollup": "^3.0.0",
"jest": "^27.5.1"
},
"publishConfig": {
Expand Down
2 changes: 1 addition & 1 deletion packages/lint-staged/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@1stg/tsconfig": "^2.0.1",
"@pkgr/utils": "^2.0.2",
"cross-env": "^7.0.3",
"prettier": "^2.5.1"
"prettier": "^2.6.0"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/markuplint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"dependencies": {
"@markuplint/vue-parser": "^2.1.0",
"@markuplint/vue-spec": "^2.0.0",
"@markuplint/vue-spec": "^2.0.1",
"markuplint-angular-parser": "^1.1.0"
},
"publishConfig": {
Expand Down
8 changes: 4 additions & 4 deletions packages/postcss-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
},
"dependencies": {
"@pkgr/utils": "^2.0.2",
"autoprefixer": "^10.4.2",
"cssnano": "^5.1.0",
"cssnano-preset-advanced": "^5.2.1",
"autoprefixer": "^10.4.4",
"cssnano": "^5.1.4",
"cssnano-preset-advanced": "^5.3.0",
"postcss-import": "^14.0.2",
"postcss-modules": "^4.3.1",
"postcss-normalize": "^10.0.1",
"postcss-preset-env": "^7.4.2",
"postcss-preset-env": "^7.4.3",
"postcss-url": "^10.1.3"
},
"publishConfig": {
Expand Down
2 changes: 1 addition & 1 deletion packages/prettier-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"prettier": ">=1.18.0"
},
"dependencies": {
"@prettier/plugin-pug": "^1.19.2",
"@prettier/plugin-pug": "^1.19.3",
"@prettier/plugin-ruby": "^2.0.0",
"@prettier/plugin-xml": "^1.2.0",
"prettier-plugin-pkg": "^0.11.1",
Expand Down
15 changes: 15 additions & 0 deletions packages/stylelint-config/_overrides.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
module.exports = loose => ({
...require('./base'),
overrides: [
{
files: [
'**/*.js',
'**/*.jsx',
'**/*.cjs',
'**/*.mjs',
'**/*.ts',
'**/*.tsx',
],
customSyntax: '@stylelint/postcss-css-in-js',
},
{
files: ['**/*.md', '**/*.mdx'],
customSyntax: 'postcss-markdown',
},
{
files: ['**/*.html', '**/*.svelte', '**/*.vue'],
customSyntax: 'postcss-html',
Expand Down
5 changes: 4 additions & 1 deletion packages/stylelint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,18 @@
},
"dependencies": {
"@pkgr/utils": "^2.0.2",
"@stylelint/postcss-css-in-js": "^0.37.2",
"postcss-html": "^1.3.0",
"postcss-less": "^6.0.0",
"postcss-markdown": "^1.2.0",
"postcss-scss": "^4.0.3",
"postcss-syntax": "^0.36.2",
"stylelint-config-prettier": "^9.0.3",
"stylelint-config-standard": "^25.0.0",
"stylelint-high-performance-animation": "^1.6.0",
"stylelint-no-unsupported-browser-features": "^5.0.3",
"stylelint-prettier": "^2.0.0",
"stylelint-scss": "^4.1.0"
"stylelint-scss": "^4.2.0"
},
"publishConfig": {
"access": "public"
Expand Down
Loading

0 comments on commit 65d9e3f

Please sign in to comment.