not possible to include extensions with multiple "." characters
graingert opened this issue · 7 comments
https://github.com/graingert/jscs-error
With only .es2015.js files included:
{
"preset": "airbnb",
"fileExtensions": ['.es2015.js']
}
JSCS still complains if .js files have errors:
$ npm install
$ ./node_modules/.bin/jscs src
Unexpected character '#' (3:4) at src/old.js :
1 |sdlkfjhskldjads
2 |asdf
3 |asdf#
------------^
4 |asdf
5 |asdf
1 code style error found.
Well in that case, i.e. *.es2015.js
, file extension would be .js
, like
require("path").extname('test.a.b')
would be .b
. For example if you filename would be v1.0.js
, extension should still be .js
.
You can mitigate this by not linting the full folder, but using glob like jscs **/*.es2015.js
This is supported by eslint
Also jscs doesn't support globs it has to be expanded by the shell
You can use globs in .eslintignore
yes, if that is what you mean by "supported", but you can't use it with --ext
flag.
You can use glob patterns with jscs from the command line
still fails when using ".es" https://github.com/graingert/jscs-error/tree/a7a0778de32084d9b8b1dd75bfb4ca0f92d2356a
@markelog also you can use it with the ext flag: ./node_modules/.bin/eslint --ext .es2015.js src
, works just fine.
@markelog can you reopen this please?
Not sure what you mean by:
Well in that case, i.e.
*.es2015.js
, file extension would be .js, likerequire("path").extname('test.a.b')
would be.b
. For example if you filename would bev1.0.js
, extension should still be.js
.You can mitigate this by not linting the full folder, but using glob like jscs */.es2015.js
Because in the case of *.es2015.js
, the file extension would be .es2015.js
and .js
.
require('lodash').endsWith('test.a.b', '.a.b')
would be true and require('lodash').endsWith('test.b', '.a.b')
would be false . Still when you had v1.0.js
the extension would be .js
. But you could also only test: 0.js
files.