-
Notifications
You must be signed in to change notification settings - Fork 0
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
Update LPLs eslint config to 3.0.1 #26
Changes from 9 commits
31d209f
b7a3e9b
c50c15c
d011b51
c1bf3e8
2b0e8a0
5261140
ef8ce74
9d21a66
9b01c9e
abee28f
f4e4e86
ca66164
ecc8493
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
tmp | ||
node_modules | ||
swagger.yml | ||
.eslintrc.json |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
module.exports = { | ||
root: true, | ||
env: { | ||
node: true, | ||
browser: true, | ||
es6: true, | ||
}, | ||
extends: [ | ||
"prettier", | ||
"eslint:recommended", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @oroth8 Small thing, but I think your editor's default settings might be setting you up with 4 spaces per tab. The source files are mostly 2-spaces, so we might want to that. Normally, I wouldn't comment on lint stuff, but early in the project, it makes sense to get our editor configs' aligned so that future PR diffss don't end up with a bunch of whitespace noise. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @vanderhoop LPL uses a 2-tab width across all projects: this is what the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think I suspect the reason this particular file isn't taking on the prettier defaults is that the path pattern isn't included in launchpad's prettier config. (Will check) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I checked, and it's not the .prettierrc or I think it's this line in the package.json, which doesn't include
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think my vscode plugin workspace settings were overriding the .prettierrc file at the root. Anyways I added |
||
"plugin:import/errors", | ||
"plugin:import/warnings" | ||
], | ||
rules: { | ||
"no-console": "warn", | ||
"no-unreachable": "warn", | ||
"no-debugger": "warn", | ||
"no-unused-vars": "warn", | ||
"no-throw-literal": "error" | ||
}, | ||
parserOptions: { | ||
ecmaVersion: 12, | ||
sourceType: "module", | ||
}, | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# Keep environment variables out of version control | ||
.env | ||
/src/logs/**/* | ||
/src/logs/**/* | ||
test.json | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we'll want to remove this from the diff. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done thx |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This file is a woopsy in the diff, as nothing in # (rest of .gitignore)
be/node_modules/
fe/node_modules/ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. added There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. also ran
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,20 @@ | ||
const path = require('path') | ||
|
||
module.exports = { | ||
extends: ['@launchpadlab/eslint-config/react-rails'], | ||
root: true, | ||
extends: ['@launchpadlab/eslint-config/react'], | ||
parser: '@babel/eslint-parser', | ||
parserOptions: { | ||
sourceType: 'module', | ||
babelOptions: { | ||
configFile: path.join(__dirname, 'babel.config.json'), | ||
}, | ||
}, | ||
settings: { | ||
'import/resolver': { | ||
webpack: { | ||
config: __dirname + '/config/webpack.config.development.js', | ||
}, | ||
}, | ||
}, | ||
} | ||
} |
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.
Inner monologue: Any chance we want to add linting to travis CI? It could avoid the manual
Nit: *
comments in PRs, and let CI do the job for us. Just a thoughtThere 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.
@vanderhoop I was thinking of creating a github action and add linting there in a separate PR. Reason being, Im not sure if we will be able to use travisCI with veritext so it might be better to use github's
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.
Yeah, now that I'm thinking about it, we should hold off until fully in Veritext's GitHub and they've given us a Jenkins file we can add scripts to.
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.
Reason being the work would be redundant, and we're gonna have to switch to their repo relatively soon