Skip to content

Commit

Permalink
feat: ✨ sharing stylelint configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
bubkoo committed Mar 21, 2021
1 parent 4f99a12 commit ba4d24b
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 18 deletions.
19 changes: 1 addition & 18 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -1,20 +1,3 @@
{
"extends": [
"stylelint-config-standard",
"stylelint-config-rational-order",
"stylelint-config-prettier"
],
"plugins": [
"stylelint-order",
"stylelint-declaration-block-no-ignored-properties"
],
"rules": {
"block-no-empty": null,
"function-name-case": "lower",
"comment-empty-line-before": null,
"no-invalid-double-slash-comments": null,
"no-descending-specificity": null,
"declaration-empty-line-before": null,
"no-duplicate-selectors": null
}
"extends": ["@antv/stylelint-config"]
}
63 changes: 63 additions & 0 deletions configs/stylelint-config/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"private": true,
"name": "@antv/stylelint-config",
"version": "1.0.0",
"main": "./lib/index.js",
"license": "MIT",
"files": [
"lib"
],
"scripts": {
"clean": "rimraf lib",
"lint": "eslint 'src/**/*.{js,ts}?(x)' --fix",
"build": "tsc --outDir ./lib",
"build:watch": "yarn build --w",
"prebuild": "run-s clean",
"preinstall": "run-s build",
"precommit": "lint-staged"
},
"lint-staged": {
"*.ts": [
"eslint --fix"
]
},
"inherits": [
"@antv/x6-package-json/cli.json",
"@antv/x6-package-json/less.json",
"@antv/x6-package-json/eslint.json"
],
"devDependencies": {
"@types/node": "^14.14.14",
"@typescript-eslint/eslint-plugin": "^4.17.0",
"@typescript-eslint/parser": "^4.17.0",
"eslint": "^7.22.0",
"eslint-config-airbnb-typescript": "^12.3.1",
"eslint-config-prettier": "^8.1.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jest": "^24.3.1",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-promise": "^4.3.1",
"eslint-plugin-react": "^7.22.0",
"eslint-plugin-react-hooks": "^4.2.0",
"eslint-plugin-unicorn": "^28.0.2",
"fs-extra": "^9.0.1",
"less": "^4.0.0",
"lint-staged": "^10.5.3",
"npm-run-all": "^4.1.5",
"prettier": "^2.2.1",
"pretty-quick": "^3.1.0",
"rimraf": "^3.0.2",
"stylelint": "^13.8.0",
"stylelint-config-prettier": "^8.0.1",
"stylelint-config-rational-order": "^0.1.2",
"stylelint-config-standard": "^20.0.0",
"stylelint-declaration-block-no-ignored-properties": "^2.3.0",
"stylelint-order": "^4.1.0",
"ts-jest": "^24.0.2",
"ts-node": "^9.1.1",
"typescript": "^4.2.3",
"watch": "^1.0.2"
}
}
20 changes: 20 additions & 0 deletions configs/stylelint-config/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module.exports = {
extends: [
'stylelint-config-standard',
'stylelint-config-rational-order',
'stylelint-config-prettier',
],
plugins: [
'stylelint-order',
'stylelint-declaration-block-no-ignored-properties',
],
rules: {
'block-no-empty': null,
'function-name-case': 'lower',
'comment-empty-line-before': null,
'no-invalid-double-slash-comments': null,
'no-descending-specificity': null,
'declaration-empty-line-before': null,
'no-duplicate-selectors': null,
},
}
3 changes: 3 additions & 0 deletions configs/stylelint-config/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "../../tsconfig.json"
}

0 comments on commit ba4d24b

Please sign in to comment.