Skip to content
This repository has been archived by the owner on May 19, 2023. It is now read-only.

Commit

Permalink
Merge pull request #126 from prettier/workflows
Browse files Browse the repository at this point in the history
Migrates from Travis CI to Github Workflows
Simplifies package.json
Sorts rules
  • Loading branch information
shannonmoeller authored Oct 11, 2021
2 parents 400939c + e9c3a49 commit 6fb1191
Show file tree
Hide file tree
Showing 6 changed files with 89 additions and 151 deletions.
6 changes: 1 addition & 5 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@ indent_style = tab
insert_final_newline = true
trim_trailing_whitespace = true

[.*rc]
indent_size = 2
indent_style = space

[*.json]
[{.*rc,*.json,*.yml}]
indent_size = 2
indent_style = space

Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: CI
on:
- push
- pull_request
jobs:
test:
name: Node.js ${{ matrix.node-version }} on ${{ matrix.os }} with stylelint ${{ matrix.stylelint-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
node-version:
- 16
- 14
- 12
os:
- ubuntu-latest
- macos-latest
- windows-latest
stylelint-version:
- 13
- 12
- 11
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- env:
STYLELINT_VERSION: ${{ matrix.stylelint-version}}
run: npm install --no-save "stylelint@${STYLELINT_VERSION}"
- run: npm test
9 changes: 0 additions & 9 deletions .travis.yml

This file was deleted.

26 changes: 1 addition & 25 deletions package-lock.json

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

26 changes: 6 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
"description": "Turns off all rules that are unnecessary or might conflict with Prettier.",
"scripts": {
"prepublishOnly": "npm run test",
"pretest": "npm run lint && npm run format",
"lint": "npr eslint --fix '{bin,src,test}/*.js'",
"format": "npr prettier --write '{bin,src,test}/*.js'",
"pretest": "npm run lint",
"lint": "npx eslint --fix \"**/*.js\" && npx prettier --write \"**/*.js\"",
"test": "node test/checker.js"
},
"keywords": [
Expand All @@ -31,32 +30,19 @@
"peerDependencies": {
"stylelint": ">=11.0.0"
},
"devDependencies": {
"npm-bin-deps": "^1.9.0",
"eslint-config-prettier": "^6.11.0"
},
"binDependencies": {
"eslint": "^7.3.0",
"prettier": "^2.0.5"
"engines": {
"node": ">= 12"
},
"eslintConfig": {
"extends": "eslint:recommended",
"env": {
"es6": true,
"node": true
},
"extends": [
"eslint:recommended",
"eslint-config-prettier"
],
"parserOptions": {
"ecmaVersion": 2019
"ecmaVersion": 8
}
},
"prettier": {
"singleQuote": true
},
"engines": {
"node": ">= 10",
"npm": ">= 5"
}
}
140 changes: 48 additions & 92 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,12 @@ module.exports = {
rules: {
indentation: null,
linebreaks: null,
'max-line-length': null,

'function-comma-newline-after': null,
'function-comma-newline-before': null,
'function-comma-space-after': null,
'function-comma-space-before': null,
'function-max-empty-lines': null,
'function-parentheses-newline-inside': null,
'function-parentheses-space-inside': null,

// prettier doesnt care about this space lets keep it here
// 'function-whitespace-after': 'always'|'never',

'value-list-comma-newline-after': null,
'value-list-comma-newline-before': null,
'value-list-comma-space-after': null,
'value-list-comma-space-before': null,
'value-list-max-empty-lines': null,

// this is fixable but lets keep it
// 'custom-property-empty-line-before': 'never'

'declaration-bang-space-after': null,
'declaration-bang-space-before': null,
'declaration-colon-newline-after': null,
'declaration-colon-space-after': null,
'declaration-colon-space-before': null,
'declaration-block-semicolon-newline-after': null,
'declaration-block-semicolon-newline-before': null,
'declaration-block-semicolon-space-after': null,
'declaration-block-semicolon-space-before': null,

// prettier always adds the trailing semicolon
'declaration-block-trailing-semicolon': null,

'at-rule-name-case': null,
'at-rule-name-newline-after': null,
'at-rule-name-space-after': null,
'at-rule-semicolon-newline-after': null,
'at-rule-semicolon-space-before': null,
'block-closing-brace-empty-line-before': null,
'block-closing-brace-newline-after': null,
'block-closing-brace-newline-before': null,
Expand All @@ -48,79 +19,64 @@ module.exports = {
'block-opening-brace-newline-before': null,
'block-opening-brace-space-after': null,
'block-opening-brace-space-before': null,
'selector-attribute-brackets-space-inside': null,

'selector-attribute-operator-space-after': null,
'selector-attribute-operator-space-before': null,

'selector-attribute-quotes': null,
'selector-combinator-space-after': null,
'selector-combinator-space-before': null,
'selector-descendant-combinator-no-non-space': null,
'selector-pseudo-class-parentheses-space-inside': null,
'selector-list-comma-newline-after': null,
'selector-list-comma-newline-before': null,
'selector-list-comma-space-after': null,
'selector-list-comma-space-before': null,
'color-hex-case': null,
'declaration-bang-space-after': null,
'declaration-bang-space-before': null,
'declaration-block-semicolon-newline-after': null,
'declaration-block-semicolon-newline-before': null,
'declaration-block-semicolon-space-after': null,
'declaration-block-semicolon-space-before': null,
'declaration-block-trailing-semicolon': null,
'declaration-colon-newline-after': null,
'declaration-colon-space-after': null,
'declaration-colon-space-before': null,
'function-comma-newline-after': null,
'function-comma-newline-before': null,
'function-comma-space-after': null,
'function-comma-space-before': null,
'function-max-empty-lines': null,
'function-parentheses-newline-inside': null,
'function-parentheses-space-inside': null,
'max-empty-lines': null,
'max-line-length': null,
'media-feature-colon-space-after': null,
'media-feature-colon-space-before': null,
'media-feature-name-case': null,
'media-feature-parentheses-space-inside': null,

// prettier doesnt care about this space
// 'media-feature-range-operator-space-after': 'always',
// 'media-feature-range-operator-space-before': 'always'

'media-query-list-comma-newline-after': null,
'media-query-list-comma-newline-before': null,
'media-query-list-comma-space-after': null,
'media-query-list-comma-space-before': null,
'at-rule-name-newline-after': null,
'at-rule-name-space-after': null,
'at-rule-semicolon-newline-after': null,
'at-rule-semicolon-space-before': null,

// prettier doesnt care about this whitespace
// 'comment-whitespace-inside': 'always'

'max-empty-lines': null,
'no-empty-first-line': null,
'no-eol-whitespace': null,
'no-extra-semicolons': null,
'no-missing-end-of-source-newline': null,
'no-empty-first-line': null,
'unicode-bom': null,
'number-leading-zero': null,

// prettier lowercases hex colors
'color-hex-case': null,

// prettier removes trailing zeros
'number-no-trailing-zeros': null,

// prettier lowercases units
'unit-case': null,

// prettier lowercases properties
'property-case': null,

// prettier lowercases pseudo class selectors
'selector-attribute-brackets-space-inside': null,
'selector-attribute-operator-space-after': null,
'selector-attribute-operator-space-before': null,
'selector-attribute-quotes': null,
'selector-combinator-space-after': null,
'selector-combinator-space-before': null,
'selector-descendant-combinator-no-non-space': null,
'selector-list-comma-newline-after': null,
'selector-list-comma-newline-before': null,
'selector-list-comma-space-after': null,
'selector-list-comma-space-before': null,
'selector-max-empty-lines': null,
'selector-pseudo-class-case': null,

// prettier lowercases pseudo element selectors
'selector-pseudo-class-parentheses-space-inside': null,
'selector-pseudo-element-case': null,

// prettier removes empty lines in selector blocks
'selector-max-empty-lines': null,

// prettier lowercases media feature names
'media-feature-name-case': null,

// prettier lowercases @ rule names
'at-rule-name-case': null,

// prettier removes extra semicolons
'no-extra-semicolons': null,

// prettier has its own quotes rule
'string-quotes': null,
'unicode-bom': null,
'unit-case': null,
'value-list-comma-newline-after': null,
'value-list-comma-newline-before': null,
'value-list-comma-space-after': null,
'value-list-comma-space-before': null,
'value-list-max-empty-lines': null,

'scss/at-else-closing-brace-newline-after': null,
'scss/at-else-closing-brace-space-after': null,
Expand Down

0 comments on commit 6fb1191

Please sign in to comment.