Package Exports
- eslint-plugin-editorconfig
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (eslint-plugin-editorconfig) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
eslint-plugin-editorconfig
ESLint plugin to follow EditorConfig
Install
$ yarn add --dev eslint eslint-plugin-editorconfigor
$ npm install --save-dev eslint eslint-plugin-editorconfigUsage
Like other ESLint plugins,
- add
editorconfigin therules. - add
"editorconfig"in theplugins.
{
// ...
"rules": {
"editorconfig/editorconfig": "error"
},
"plugins": [ "editorconfig" ]
}Conflicting ESLint rules
Following rules may conflicts editorconfig rule.
It is recommended to disable them.
- eol-last
- indent
- linebreak-style
- no-trailing-spaces
- unicode-bom
If above rules are specified in your .eslintrc, just remove them.
If they are specified in the extended config, consider adding plugin:editorconfig/noconflict to your extends.
{
"extends": [
"@phanect/phanective",
"plugin:editorconfig/noconflict"
],
// ...
}
Unsupported Parameters
Some of the EditorConfig parameters are unsupported.
end_of_line
When end_of_line = cr is specified in .editorconfig, ESLint does nothing.
charset
This plugin works only when utf-8 or utf-8-bom is specified.
ESLint only verifies if BOM is specified or not.