Skip to content

Commit

Permalink
Merge pull request #8 from apostrophecms/bump-stylelint
Browse files Browse the repository at this point in the history
Stylelint v14, update rules and dependencies
  • Loading branch information
myovchev authored Sep 8, 2022
2 parents f7824ab + 000c55d commit 9df95d9
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 11 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased

## Added

- Update dependencies and rules for stylelint v14+, remove `peerDependencies` package property.

## [1.1.0] - 2021-10-28

### Added
Expand Down
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,17 @@ This config also leverages the following plugins to fine tune our rules.
npm i stylelint-config-apostrophe --save-dev
```

## Package versions

Choose the appropriate for your application `stylelint-config-apostrophe` version based on the `stylelint` dependency introduced on a project level:

| Stylelint | Apostrophe config |
| :-------------- | ----------------: |
| >= v13.8.x < 14 | v1.x.x |
| v14.x.x | v2.x.x |

[Migrating to stylelint v14](https://stylelint.io/migration-guide/to-14/)

## Usage

If you've installed `stylelint-config-apostrophe` locally within your project, just set your `stylelint` config to:
Expand Down
18 changes: 8 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"compare": "node ./lib/index",
"test": "eslint . && npx mocha && npm run stylelint",
"postinstall": "npm run check",
"stylelint": "npx stylelint 'test/*.scss' --config stylelintrc.json"
"stylelint": "npx stylelint 'test/*.scss' --custom-syntax postcss-scss --config stylelintrc.json"
},
"repository": {
"type": "git",
Expand All @@ -20,15 +20,12 @@
"url": "https://github.com/apostrophecms/stylelint-config-apostrophe/issues"
},
"homepage": "https://github.com/apostrophecms/stylelint-config-apostrophe#readme",
"peerDependencies": {
"stylelint": "^13.8.0"
},
"dependencies": {
"stylelint-config-standard": "20.0.0",
"stylelint-declaration-strict-value": "1.7.7",
"stylelint-order": "4.1.0",
"stylelint-scss": "^3.18.0",
"stylelint-selector-bem-pattern": "2.1.0"
"stylelint-config-standard": "^28.0.0",
"stylelint-declaration-strict-value": "^1.9.0",
"stylelint-order": "^5.0.0",
"stylelint-scss": "^4.3.0",
"stylelint-selector-bem-pattern": "^2.1.1"
},
"devDependencies": {
"eslint": "^7.32.0",
Expand All @@ -38,6 +35,7 @@
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.1.0",
"mocha": "^7.2.0"
"mocha": "^7.2.0",
"postcss-scss": "^4.0.4"
}
}
1 change: 0 additions & 1 deletion stylelintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@
"ignore": ["inside-function"]
}
],
"function-calc-no-invalid": true,
"function-calc-no-unspaced-operator": true,
"function-comma-newline-after": "always-multi-line",
"function-comma-space-after": "always-single-line",
Expand Down

0 comments on commit 9df95d9

Please sign in to comment.