Skip to content

Instantly share code, notes, and snippets.

@srikat srikat/notes
Last active Apr 12, 2017

Embed
What would you like to do?
stylelint and ESLint for WordPress CSS & JavaScript Coding Standards
0) Install node via nvm
1) npm install -g eslint stylelint stylelint-config-wordpress eslint-config-wordpress
2) install SublimeLinter-contrib-stylelint ST package.
3) Create file named .stylelintrc in a locaton, say /Users/sridharkatakam/Documents/Websites having https://bbpress.trac.wordpress.org/browser/trunk/.stylelintrc
4) In SublimeLinter User Settings,
"stylelint": {
"@disable": false,
"args": [
"--config",
"/Users/sridharkatakam/Documents/Websites/.stylelintrc"
],
"excludes": []
}
5) Create .eslintrc file in /Users/sridharkatakam/Documents/Websites having
extends: 'wordpress'
Notes:
1) https://github.com/ntwb/eslint-config-wordpress
2) sridhar [11:06 AM]
How does eslint know to look for `.eslintrc` wherever that file currently is?
I wonder if `.eslintrc` file is actually being used..
netweb [11:06 AM]
It traverses up the path looking for a valid ESLint configuration file, stylelint also does this (edited)
3) SublimeLinter.sublime-settings (Tools > SublimeLinter > Open User Settings): http://pastebin.com/raw/88KSSwbZ
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.