jednano / eclint

Validate or fix code that doesn't adhere to EditorConfig settings or infer settings from existing code.
MIT License
305 stars 28 forks source link

Can't use `none` value to override defaults #150

Closed mcandre closed 6 years ago

mcandre commented 6 years ago

The EditorConfig spec declares that none is an acceptable value for any EditorConfig property, disabling a rule for the given file pattern(s):

https://github.com/editorconfig/editorconfig/issues/379#issuecomment-437697328

However, eclint does not appear to support this, causing spurious warnings in my projects:

$(npm bin)/eclint check examples/hello.bat 
examples/hello.bat
    01:01 ❌ invalid charset: utf-16be, expected: none
                                           (EditorConfig charset https://goo.gl/hK94EO)

Please allow any and all rules to be disabled, by matching on a property value of none, per the spec, so that users can have fine grained control over how they configure EditorConfig for their projects.

eclint already does 99% of this, using a proprietary value unset to disable rules. We should adopt the name none for this, to match the EditorConfig standard, and perhaps continue supporting unset as an alias for a while, to maintain backwards compatibility with old eclint for a while.

jednano commented 6 years ago

ECLint uses the editorconfig-core-js under the hood, so that's where you should file this particular issue. And it should be unset, not none.