1
1
mirror of https://github.com/primer/css.git synced 2024-12-23 14:13:14 +03:00

.stylelintrc.json -> stylelint.config.js; add script/lint-ci

This commit is contained in:
Shawn Allen 2019-09-25 13:17:00 -07:00
parent bdb08b30b8
commit 3f96d4ed02
5 changed files with 19 additions and 14 deletions

View File

@ -9,11 +9,11 @@ jobs:
with:
version: 11
- name: install
run: npm --unsafe-perm install
run: npm install
- name: lint
run: npm --unsafe-perm run lint
run: script/lint-ci
- name: test
run: npm --unsafe-perm test
run: npm test
- name: prepublish
run: script/prepublish
- name: test deprecations

View File

@ -1,8 +0,0 @@
{
"extends": [
"stylelint-config-primer"
],
"rules": {
"primer/no-override": false
}
}

View File

@ -24,9 +24,10 @@
"scripts": {
"fresh": "rm -rf node_modules; npm install",
"dist": "script/dist.js",
"lint": "npm-run-all -s lint-css lint-js",
"lint-css": "stylelint --quiet --syntax scss src/**/*.scss",
"lint-js": "eslint script docs deprecations.js lib .storybook",
"lint": "npm-run-all -s stylelint eslint eslint-docs",
"stylelint": "stylelint --quiet src",
"eslint": "eslint script deprecations.js lib .storybook",
"eslint-docs": "eslint docs/{content,src,*.js}",
"postpublish": "script/postpublish",
"prepublishOnly": "script/prepublish",
"publish-storybook": "script/publish-storybook",

5
script/lint-ci Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash -e
npm run stylelint -- --cache
npx stylelint src --cache --report-needless-disables
npm run eslint
npm run eslint-docs

7
stylelint.config.js Normal file
View File

@ -0,0 +1,7 @@
module.exports = {
extends: ['stylelint-config-primer'],
syntax: 'scss',
rules: {
'primer/no-override': false
}
}