A template project with a ready-to-use scripts that validates your project by BEM rules: run 'npm run test' and review messages.
-
Clone this repository into your environment
-
Install 'Node.js': https://nodejs.org/en/download/
-
Install dependencies: 'npm i'
-
Copy your sources into the repository folder:
-
Run the 'test' script and review the output: 'npm run test'
Don't forget to use https://validator.w3.org/#validate_by_input and https://yoksel.github.io/html-tree/ to validate you HTML structure.
And, use https://jigsaw.w3.org/css-validator/#validate_by_input to validate your CSS (the 'npm run postcss-import' script combines all CSS files into a single file).
- ESLint
- 'HTML ESLint' plugin for ESLint
- Stylelint
- PostCSS
- HTML Validate
- BEM
- A set of custom Stylelint rules: stylelint-bem-newbie
- How to fix: ESLint couldn't determine the plugin uniquely: eslint/eslint#13385 - use '--resolve-plugins-relative-to .' or 'root'
- How to fix: WARN config global
--global
,--local
are deprecated: https://stackoverflow.com/questions/72401421/message-npm-warn-config-global-global-local-are-deprecated-use-loc - Why html-validator is not used: it shows non-readable messages and doesn't have a config to disable some rules