Open philholden opened 8 years ago
@philholden -- The builder-victory-component
archetype contains the eslint configurations at: https://github.com/FormidableLabs/builder-victory-component/tree/master/config/eslint
Although a controversial topic for sure, we don't rely on ASI here or at Walmart, where we helped develop and maintain the https://github.com/walmartlabs/eslint-config-defaults/ project and the Walmart presets at https://github.com/walmartlabs/eslint-config-defaults/tree/master/configurations/walmart Although generally speaking "You can basically just leave out semi-colons and everything works." is correct, there is no correctness disadvantage to adhering to the actual EMCAScript spec.
And put another way -- there are passionate advocates of both double quotes and single quotes for project within Formidable. For our archetype here it does not really matter which we go with, just that we go with a single choice.
That said, as with all things builder
, folks can easily override tasks in their ROOT/package.json
as follows:
Either override the three indvidual tasks that comprise lint
: https://github.com/FormidableLabs/builder-victory-component/blob/master/package.json#L40-L42
"lint-server": "eslint --color -c .eslintrc-server *.js",
"lint-client": "eslint --color --ext .js,.jsx -c .eslintrc-client src demo/*.jsx",
"lint-client-test": "eslint --color --ext .js,.jsx -c .eslintrc-client-test src test/client",
where you have the new files .eslintrc-server
, .eslintrc-client
and .eslintrc-client-test
in the root of your project; OR,
Override all of the lint task with a unified .eslintrc
in the root of your project.
"lint": "eslint --color --ext .js,.jsx -c .eslintrc *.js src demo/*.jsx test/client",
@philholden -- The builder-victory-component archetype contains the eslint configurations at: https://github.com/FormidableLabs/builder-victory-component/tree/master/config/eslint
Hi Ryan, I guess what I am saying is it would be nice to have somehow have .eslintrc
top level along with .editorconfig
as this is where editor linting plugins look for it.
@philholden -- Do you mean in the generator / boilerplate to create ROOT/.eslintrc
or do you mean in https://github.com/FormidableLabs/builder-victory-component/tree/master/config/eslint ?
package.json
contains .eslint as a dev dependency but there is no.eslintrc
in the generated project. I am really likingrackt
presets:My
.eslintrc
looks like this:Redux now uses
rackt
for linting as doesreact-router
. It has no semicolons which was a little scary at first but because we are always transpiling we never need to worry about old browser issues that prevented us doing this in the past. You can basically just leave out semi-colons and everything works.