-
-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: add webpack-defaults #34
Conversation
The ESLint Config is interpreted a bit tbh 😛 , but I would like to open discussion about a few of these rules anyways |
@@ -0,0 +1,27 @@ | |||
const fs = require('fs-extra'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally, I'd just disable eslint for any test utility files, they have little to no bearing on code quality where it really matters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To the point, the rules you mentioned in the comment above have an effect on code readability / quality for source files and are there for a reason imo.
For something like webpack.build.js
where it has no effect on the above, I would sooner disable the linting outright in the file than disable rules across the organization that have a positive effect on overall quality.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
global-require
should not be disabled by default as it's frowned upon in general.
In the certain cases where it's necessary, it should be disabled inline or in the .eslintrc
on a case by case basis and set to warn
from error
so they can be addressed at a later date where applicable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still import/order no-param-reassign
are 'conflicting' with the loader logic, the first for style/readability the latter for sourcemaps
import fs from 'fs'
import path from 'path'
import { getOptions } from 'loader-utils'
import { validateOptions } from 'schema-utils'
import helper from './helper'
if (options.sourceMap) {
map = updateMap(map)
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import/order - webpack-contrib/eslint-config-webpack#7
"main": "dist/cjs.js", | ||
"files": [ | ||
"dist" | ||
], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"repository": {
"type": "git",
"url": "git+https://github.com/webpack-contrib/coffee-loader.git"
},
"bugs": {
"url": "https://github.com/webpack-contrib/coffee-loader/issues"
},
"homepage": "https://webpack.js.org",
@michael-ciniawsky - As we work through these, just create a named branch in the origin repo, makes it easier to test out for the group. You have org wide write access, far simpler than maintaining a fork :) |
Fix
Test
Docs
Refactor
webpack-defaults
options.sourceMap
)TODO
schema-utils
Fixes #14, #21, #31, #32, #33