Skip to content

Commit

Permalink
Set up stylelint and prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
Woedenaz committed Jul 22, 2021
1 parent 7c01366 commit f6d1f54
Show file tree
Hide file tree
Showing 25 changed files with 2,651 additions and 2,319 deletions.
5 changes: 3 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@
"parserOptions": {
"sourceType": "module"
},
"extends": "eslint:recommended",
"extends": ["eslint:recommended", "prettier"],
"rules": {
"quotes": ["error", "double"],
"semi": ["error", "always"],
"prettier/prettier": "error",
"no-console": "off"
}
}
}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ node_modules/
package-lock.json
yarn.lock


# yarn
yarn.lock

Expand Down
18 changes: 18 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Build Files
build
dist/
*.map

# NPM
node_modules/
package-lock.json
yarn.lock

# yarn
yarn.lock

# Misc
.DS_Store
.*.swp
*.bak
.vscode/
1 change: 1 addition & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
5 changes: 5 additions & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Ignore Wrap Files
/src/css/black-highlighter-wrap-begin.css
/src/css/black-highlighter-wrap-close.css
/src/css/normalize-wrap-begin.css
/src/css/normalize-wrap-close.css
3 changes: 3 additions & 0 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": ["stylelint-config-property-sort-order-smacss"]
}
4 changes: 2 additions & 2 deletions cssnano.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
const defaultPreset = require('cssnano-preset-default');
const defaultPreset = require("cssnano-preset-default");

module.exports = defaultPreset({
discardComments: {
removeAll: true,
},
cssDeclarationSorter: {
order: 'concentric-css',
order: "smacss",
},
normalizeCharset: false,
reduceIdents: false,
Expand Down
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,19 @@
"devDependencies": {
"autoprefixer": "^10.2.5",
"cssnano": "^5.0.0",
"eslint-config-prettier": "^8.3.0",
"imagemin": "^8.0.0",
"imagemin-gifsicle": "^7.0.0",
"imagemin-optipng": "^8.0.0",
"imagemin-svgo": "^9.0.0",
"postcss": "^8.2.8",
"postcss-cli": "^8.3.1",
"postcss-import": "^14.0.0"
"postcss-import": "^14.0.0",
"prettier": "2.3.2",
"stylelint": "^13.13.1",
"stylelint-config-property-sort-order-smacss": "^7.1.0",
"stylelint-config-standard": "^22.0.0",
"stylelint-order": "^4.1.0"
},
"scripts": {
"build": "make",
Expand Down
Loading

0 comments on commit f6d1f54

Please sign in to comment.