Swap out sass-lint with stylelint (#328)
* Swap out sass-lint * Include standard SCSS rules for stylelint * Fix stylelint violations * Update Actions to use stylelint Co-authored-by: Jake Gealer <jake@gealer.email>pull/329/head
parent
98ac6b2f21
commit
23350f3a57
|
@ -29,7 +29,7 @@ jobs:
|
||||||
- name: Test with eslint
|
- name: Test with eslint
|
||||||
run: npm run test:eslint
|
run: npm run test:eslint
|
||||||
|
|
||||||
sass-lint:
|
stylelint:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
@ -52,8 +52,8 @@ jobs:
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
|
|
||||||
- name: Test with sass-lint
|
- name: Test with stylelint
|
||||||
run: npm run test:sass-lint
|
run: npm run test:stylelint
|
||||||
|
|
||||||
i18n-packs:
|
i18n-packs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
38
.sasslintrc
38
.sasslintrc
|
@ -1,38 +0,0 @@
|
||||||
{
|
|
||||||
"rules": {
|
|
||||||
"quotes": [
|
|
||||||
2,
|
|
||||||
{
|
|
||||||
"style": "double"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"pseudo-element": 2,
|
|
||||||
"trailing-semicolon": 2,
|
|
||||||
"final-newline": 2,
|
|
||||||
"leading-zero": 2,
|
|
||||||
"no-trailing-zero": 2,
|
|
||||||
"no-css-comments": 0,
|
|
||||||
"no-vendor-prefixes": 0,
|
|
||||||
"no-transition-all": 0,
|
|
||||||
"property-sort-order": 2,
|
|
||||||
"empty-line-between-blocks": 2,
|
|
||||||
"single-line-per-selector": 2,
|
|
||||||
"no-duplicate-properties": 2,
|
|
||||||
"no-color-literals": 0,
|
|
||||||
"hex-notation": [
|
|
||||||
2,
|
|
||||||
{
|
|
||||||
"style": "lowercase"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"hex-length": 2,
|
|
||||||
"force-element-nesting": 0,
|
|
||||||
"force-pseudo-nesting": 0,
|
|
||||||
"nesting-depth": 0,
|
|
||||||
"no-qualifying-elements": 0,
|
|
||||||
"indentation": 1,
|
|
||||||
"no-url-domains": 0,
|
|
||||||
"no-url-protocols": 0,
|
|
||||||
"placeholder-in-extend": 0
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -83,7 +83,7 @@ routing, reverse proxy, www/non-www redirect, CDN, PHP (TCP/socket, WordPress, D
|
||||||
|
|
||||||
4. Open the development site **[localhost:8080](http://localhost:8080)**
|
4. Open the development site **[localhost:8080](http://localhost:8080)**
|
||||||
|
|
||||||
5. Lint your code *(eslint & sass-lint)*
|
5. Lint your code *(eslint & stylelint)*
|
||||||
```sh
|
```sh
|
||||||
npm test
|
npm test
|
||||||
```
|
```
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -20,12 +20,12 @@
|
||||||
"dev": "npm run build:template && npm run build:prism && npm run dev:tool",
|
"dev": "npm run build:template && npm run build:prism && npm run dev:tool",
|
||||||
"dev:tool": "vue-cli-service serve src/nginxconfig/mount.js",
|
"dev:tool": "vue-cli-service serve src/nginxconfig/mount.js",
|
||||||
"deploy:spaces:comment": "do-vue comment nginxconfig",
|
"deploy:spaces:comment": "do-vue comment nginxconfig",
|
||||||
"test": "npm run test:eslint && npm run test:sass-lint && npm run test:i18n-packs && npm run test:jest",
|
"test": "npm run test:eslint && npm run test:stylelint && npm run test:i18n-packs && npm run test:jest",
|
||||||
"test:jest": "jest --env=jsdom /test/.*.js?$",
|
"test:jest": "jest --env=jsdom /test/.*.js?$",
|
||||||
"test:fix": "npm run test:eslint:fix",
|
"test:fix": "npm run test:eslint:fix",
|
||||||
"test:eslint": "eslint 'src/**/*.{js,vue}'",
|
"test:eslint": "eslint 'src/**/*.{js,vue}'",
|
||||||
"test:eslint:fix": "npm run test:eslint -- --fix",
|
"test:eslint:fix": "npm run test:eslint -- --fix",
|
||||||
"test:sass-lint": "sass-lint 'src/**/*.scss' --verbose --no-exit --config .sasslintrc",
|
"test:stylelint": "stylelint 'src/**/*.scss' --config node_modules/do-bulma/.stylelintrc.json",
|
||||||
"test:i18n-packs": "node --es-module-specifier-resolution=node src/nginxconfig/i18n/verify.js"
|
"test:i18n-packs": "node --es-module-specifier-resolution=node src/nginxconfig/i18n/verify.js"
|
||||||
},
|
},
|
||||||
"jest": {
|
"jest": {
|
||||||
|
@ -80,8 +80,10 @@
|
||||||
"node-fetch": "^3.2.0",
|
"node-fetch": "^3.2.0",
|
||||||
"postcss": "^8.4.6",
|
"postcss": "^8.4.6",
|
||||||
"sass": "^1.49.7",
|
"sass": "^1.49.7",
|
||||||
"sass-lint": "git+https://github.com/do-community/sass-lint.git",
|
|
||||||
"sass-loader": "^11.1.1",
|
"sass-loader": "^11.1.1",
|
||||||
|
"stylelint": "^14.3.0",
|
||||||
|
"stylelint-config-standard-scss": "^3.0.0",
|
||||||
|
"stylelint-order": "^5.0.0",
|
||||||
"vue-template-compiler": "^2.6.14",
|
"vue-template-compiler": "^2.6.14",
|
||||||
"webpack-bundle-analyzer": "^4.5.0"
|
"webpack-bundle-analyzer": "^4.5.0"
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright 2021 DigitalOcean
|
Copyright 2022 DigitalOcean
|
||||||
|
|
||||||
This code is licensed under the MIT License.
|
This code is licensed under the MIT License.
|
||||||
You may obtain a copy of the License at
|
You may obtain a copy of the License at
|
||||||
|
@ -42,8 +42,7 @@ THE SOFTWARE.
|
||||||
|
|
||||||
.close {
|
.close {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-flow: row nowrap;
|
||||||
flex-wrap: nowrap;
|
|
||||||
margin: 0 0 1.25rem;
|
margin: 0 0 1.25rem;
|
||||||
|
|
||||||
p {
|
p {
|
||||||
|
|
|
@ -26,8 +26,7 @@ THE SOFTWARE.
|
||||||
|
|
||||||
.field-row {
|
.field-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-flow: row wrap;
|
||||||
flex-wrap: wrap;
|
|
||||||
margin: 0 -.5rem;
|
margin: 0 -.5rem;
|
||||||
|
|
||||||
.field {
|
.field {
|
||||||
|
@ -87,7 +86,7 @@ THE SOFTWARE.
|
||||||
|
|
||||||
.is-changed {
|
.is-changed {
|
||||||
input {
|
input {
|
||||||
&:not(.vs__search) {
|
&:not(.vs__search) { // stylelint-disable-line selector-class-pattern
|
||||||
&,
|
&,
|
||||||
&:focus {
|
&:focus {
|
||||||
background: rgba($highlight, .35);
|
background: rgba($highlight, .35);
|
||||||
|
@ -108,7 +107,7 @@ THE SOFTWARE.
|
||||||
}
|
}
|
||||||
|
|
||||||
.v-select {
|
.v-select {
|
||||||
.vs__dropdown-toggle { // sass-lint:disable-line class-name-format
|
.vs__dropdown-toggle { // stylelint-disable-line selector-class-pattern
|
||||||
background: rgba($highlight, .35);
|
background: rgba($highlight, .35);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright 2020 DigitalOcean
|
Copyright 2022 DigitalOcean
|
||||||
|
|
||||||
This code is licensed under the MIT License.
|
This code is licensed under the MIT License.
|
||||||
You may obtain a copy of the License at
|
You may obtain a copy of the License at
|
||||||
|
@ -36,8 +36,7 @@ THE SOFTWARE.
|
||||||
.header-group,
|
.header-group,
|
||||||
.buttons-group {
|
.buttons-group {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-flow: row wrap;
|
||||||
flex-wrap: wrap;
|
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright 2020 DigitalOcean
|
Copyright 2022 DigitalOcean
|
||||||
|
|
||||||
This code is licensed under the MIT License.
|
This code is licensed under the MIT License.
|
||||||
You may obtain a copy of the License at
|
You may obtain a copy of the License at
|
||||||
|
@ -28,8 +28,7 @@ THE SOFTWARE.
|
||||||
ul {
|
ul {
|
||||||
li {
|
li {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-flow: row nowrap;
|
||||||
flex-wrap: nowrap;
|
|
||||||
|
|
||||||
&:hover,
|
&:hover,
|
||||||
&:focus {
|
&:focus {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright 2020 DigitalOcean
|
Copyright 2022 DigitalOcean
|
||||||
|
|
||||||
This code is licensed under the MIT License.
|
This code is licensed under the MIT License.
|
||||||
You may obtain a copy of the License at
|
You may obtain a copy of the License at
|
||||||
|
@ -24,7 +24,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
THE SOFTWARE.
|
THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// sass-lint:disable-block class-name-format
|
// stylelint-disable selector-class-pattern
|
||||||
.v-select {
|
.v-select {
|
||||||
&.vs--open {
|
&.vs--open {
|
||||||
> ul {
|
> ul {
|
||||||
|
@ -49,7 +49,7 @@ THE SOFTWARE.
|
||||||
}
|
}
|
||||||
|
|
||||||
> ul {
|
> ul {
|
||||||
display: block !important; // sass-lint:disable-line no-important
|
display: block !important;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
transition: opacity $transition;
|
transition: opacity $transition;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
Copyright 2021 DigitalOcean
|
Copyright 2022 DigitalOcean
|
||||||
|
|
||||||
This code is licensed under the MIT License.
|
This code is licensed under the MIT License.
|
||||||
You may obtain a copy of the License at
|
You may obtain a copy of the License at
|
||||||
|
@ -27,21 +27,25 @@ THE SOFTWARE.
|
||||||
$header: #0071fe;
|
$header: #0071fe;
|
||||||
$highlight: #f2c94c;
|
$highlight: #f2c94c;
|
||||||
$callout: #f3f5f9;
|
$callout: #f3f5f9;
|
||||||
|
|
||||||
@import "~do-bulma/src/style";
|
@import "~do-bulma/src/style";
|
||||||
|
|
||||||
.do-bulma {
|
.do-bulma {
|
||||||
@import "../../../build/prism";
|
@import "../../../build/prism";
|
||||||
|
|
||||||
$pretty--color-dark: $primary;
|
$pretty--color-dark: $primary; // stylelint-disable-line scss/dollar-variable-pattern
|
||||||
$pretty--color-default: $primary;
|
$pretty--color-default: $primary; // stylelint-disable-line scss/dollar-variable-pattern
|
||||||
|
|
||||||
@import "~pretty-checkbox/src/pretty-checkbox";
|
@import "~pretty-checkbox/src/pretty-checkbox";
|
||||||
|
|
||||||
$vs-border-color: $border;
|
$vs-border-color: $border;
|
||||||
$vs-border-radius: $border-radius;
|
$vs-border-radius: $border-radius;
|
||||||
$vs-dropdown-box-shadow: 0 2px 4px rgba($dark-blue, .06);
|
$vs-dropdown-box-shadow: 0 2px 4px rgba($dark-blue, .06);
|
||||||
$vs-state-active-bg: $primary;
|
$vs-state-active-bg: $primary;
|
||||||
|
|
||||||
@import "~vue-select/src/scss/vue-select";
|
@import "~vue-select/src/scss/vue-select";
|
||||||
|
|
||||||
|
// Local imports
|
||||||
@import "header";
|
@import "header";
|
||||||
@import "tabs";
|
@import "tabs";
|
||||||
@import "panel";
|
@import "panel";
|
||||||
|
|
Loading…
Reference in New Issue