You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When i install config globally, plugin:node/recommended will install into eslint-config-hexo directory (under subdir). And plugin actually not work, because eslint must see node plugin in same level hierarchy. But then i install it locally, node plugin will placed in same level as eslint.
node -v && npm -v
v6.14.0
3.10.10
[root@localhost ivan-nginx]# npm i -g eslint-config-hexo
/usr/lib
├── UNMET PEER DEPENDENCY eslint@>= 3.1.0
└─┬ eslint-config-hexo@3.0.0
├── UNMET PEER DEPENDENCY eslint@>=3.1.0
└─┬ eslint-plugin-node@5.2.1
├── ignore@3.3.8
├─┬ minimatch@3.0.4
│ └─┬ brace-expansion@1.1.11
│ ├── balanced-match@1.0.0
│ └── concat-map@0.0.1
├─┬ resolve@1.7.1
│ └── path-parse@1.0.5
└── semver@5.3.0
npm WARN eslint-config-hexo@3.0.0 requires a peer of eslint@>= 3.1.0 but none was installed.
npm WARN eslint-plugin-node@5.2.1 requires a peer of eslint@>=3.1.0 but none was installed.
Solution is — install eslint-plugin-node separately:
npm i -g eslint-config-hexo eslint-plugin-node
There are duplicate parameters in eslint.js: dot-notation and no-multi-str. And i also see other parameters which already by default in eslint:recommended settings. Fixed in Remove unnecessarily overwritten recommended config #6
When i install config globally,
plugin:node/recommended
will install intoeslint-config-hexo
directory (under subdir). And plugin actually not work, becauseeslint
must seenode
plugin in same level hierarchy. But then i install it locally,node
plugin will placed in same level aseslint
.node -v && npm -v v6.14.0 3.10.10
Solution is — install
eslint-plugin-node
separately:There are duplicate parameters inFixed in Remove unnecessarily overwritten recommended config #6eslint.js
:dot-notation
andno-multi-str
. And i also see other parameters which already by default ineslint:recommended
settings.All
'error'
strings can be sucessfully replaced by2
: https://eslint.org/docs/user-guide/configuring#configuring-rulesNo need to define
parserOptions: { ecmaVersion: 6 }
parameter ifenv: { es6: true }
already defined: https://eslint.org/docs/user-guide/configuring#specifying-parser-optionsDeprecated parameter
'eqeqeq': ['error', 'allow-null']
: https://eslint.org/docs/rules/eqeqeq#allow-nullstrict
option not needed for ES6, because in ES6 this mode turned on by default.About pull #6:
no-extra-label
now in Best Practices section.no-mixed-operators
now in Stylistic Issues section.comma-dangle
can be justerror
,never
parameter is default for now.comma-spacing
can be justerror
,before: false, after: true
is default for now.comma-style
can be justerror
,last
is default for now.computed-property-spacing
can be justerror
,never
is default for now.key-spacing
can be justerror
,beforeColon: false, afterColon: true
is default for now.But i suggest to set
{"align": "colon"}
parameter.keyword-spacing
can be justerror
, no needed to set empty['error', {}]
parameters.linebreak-style
can be justerror
,unix
is default for now.lines-around-comment
can be justerror
,{ beforeBlockComment: true }
is default for now.semi
can be justerror
,always
is default for now.semi-spacing
can be justerror
,before: false, after: true
is default for now.space-before-blocks
can be justerror
,always
is default for now.space-before-function-paren
can be justerror
,always
is default for now.space-in-parens
can be justerror
,never
is default for now.spaced-comment
can be justerror
,always
is default for now.template-tag-spacing
can be justerror
,never
is default for now.unicode-bom
can be justerror
,never
is default for now.rest-spread-spacing
can be justerror
,never
is default for now.template-curly-spacing
can be justerror
,never
is default for now.yield-star-spacing
can be justerror
,after
is default for now.yoda
can be justerror
,never
is default for now.The text was updated successfully, but these errors were encountered: