Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add linting commands for JS, CSS, and PHP (#175)
* Add linting commands for JS, CSS, and PHP Setup is copied from wc-admin, except for `install-if-deps-outdated`. Commands added: - npm run lint # for both JS and CSS - npm run lint:css - npm run lint:css-fix # lint and fix CSS - npm run lint:js - npm run lint:php - npm run lint:php-fix # lint and fix PHP
- Loading branch information
Showing
5 changed files
with
1,018 additions
and
229 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
bin/* | ||
!bin/generate-docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/** @format */ | ||
|
||
{ | ||
"root": true, | ||
"parser": "babel-eslint", | ||
"extends": [ "wpcalypso/react", "plugin:jsx-a11y/recommended" ], | ||
"plugins": [ "jsx-a11y", "jest" ], | ||
"env": { | ||
"browser": true, | ||
"jest/globals": true, | ||
"node": true, | ||
}, | ||
"globals": { | ||
"wp": true, | ||
"wpApiSettings": true, | ||
"wcSettings": true, | ||
}, | ||
"settings": { | ||
"react": { | ||
"version": "detect", | ||
}, | ||
}, | ||
"rules": { | ||
"camelcase": 0, | ||
"indent": 0, | ||
"max-len": [ 2, { "code": 140 } ], | ||
"no-console": 1, | ||
"react/no-danger": 0, | ||
"react/react-in-jsx-scope": 0, | ||
"wpcalypso/import-no-redux-combine-reducers": 0, | ||
"wpcalypso/jsx-classname-namespace": 0, | ||
"wpcalypso/redux-no-bound-selectors": 1, | ||
"jsx-a11y/label-has-for": [ "error", { | ||
"required": "id" | ||
} ] | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"extends": "stylelint-config-wordpress", | ||
"rules": { | ||
"at-rule-empty-line-before": null, | ||
"at-rule-no-unknown": null, | ||
"comment-empty-line-before": null, | ||
"declaration-block-no-duplicate-properties": null, | ||
"declaration-colon-newline-after": null, | ||
"declaration-property-unit-whitelist": null, | ||
"font-weight-notation": null, | ||
"max-line-length": null, | ||
"no-descending-specificity": null, | ||
"no-duplicate-selectors": null, | ||
"rule-empty-line-before": null, | ||
"selector-class-pattern": null, | ||
"string-quotes": "single", | ||
"value-keyword-case": null, | ||
"value-list-comma-newline-after": null | ||
} | ||
} |
Oops, something went wrong.