Advertisement
srikat

Untitled

Jan 18th, 2017
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. Setting up stylelint and ESLint for WordPress CSS & JavaScript Coding Standards
  2.  
  3. 1) npm install -g eslint stylelint stylelint-config-wordpress eslint-config-wordpress
  4.  
  5. 2) install `SublimeLinter-contrib-stylelint` ST package.
  6.  
  7. 3) Create file named `.stylelintrc` in /Users/sridharkatakam/Documents/Websites having https://bbpress.trac.wordpress.org/browser/trunk/.stylelintrc
  8.  
  9. 4) In SublimeLinter User Settings,
  10.  
  11. "stylelint": {
  12. "@disable": false,
  13. "args": [
  14. "--config",
  15. "/Users/sridharkatakam/Documents/Websites/.stylelintrc"
  16. ],
  17. "excludes": []
  18. }
  19.  
  20. 5) Create .eslintrc file in /Users/sridharkatakam/Documents/Websites having
  21. extends: 'wordpress'
  22.  
  23. Notes:
  24.  
  25. https://github.com/ntwb/eslint-config-wordpress
  26.  
  27. sridhar [11:06 AM]
  28. How does eslint know to look for `.eslintrc` wherever that file currently is?
  29. I wonder if `.eslintrc` file is actually being used..
  30.  
  31. netweb [11:06 AM]
  32. It traverses up the path looking for a valid ESLint configuration file, stylelint also does this (edited)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement