-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Lint entire codebase #4156
Lint entire codebase #4156
Conversation
✅ Deploy Preview for remixproject ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
are the rules used in linting this also in the lint config? meaning, does it checked during the lint step in CI? otherwise it wouldn't make sense. |
basically yes. It follows the eslint rules you created. I just applied them per file manually. |
use: ["source-map-loader"], | ||
enforce: "pre" | ||
use: ['source-map-loader'], | ||
enforce: 'pre', |
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.
Not sure if we should use comma for last item in JSON . See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Trailing_commas
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.
This isn't a json file. its a js file
|
||
config.watchOptions = { | ||
ignored: /node_modules/ | ||
ignored: /node_modules/, |
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.
same here
} | ||
return res.join(' '); | ||
case 'ContractDefinition': | ||
return undefined; |
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.
semicolon should be removed
return undefined; | ||
|
||
case 'FunctionDefinition': { | ||
const { kind, name } = item; |
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.
semicolon should be removed
|
||
case 'FunctionDefinition': { | ||
const { kind, name } = item; | ||
const params = item.parameters.parameters; |
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.
same here
|
||
case 'ModifierDefinition': { | ||
const params = item.parameters.parameters; | ||
return `modifier ${item.name}(${params.map(formatVariable).join(', ')})`; |
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.
semicolon should be removed. Please check all such places
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.
resolved
then why would linting pass in the previous codebase? if the rule was in place.. aren't we mixing prettier and linting. |
@bunsenstraat I think we aren't. The thing is prettier ensures the files are formatted with 2 spaces with 2 or 3 rules for semi colons, & commas. So I just did the 2 space thing for code files that were missed (somehow) and fix any existing semi colons. |
_paq.push(['setTrackerUrl', u + 'matomo.php']) | ||
_paq.push(['setSiteId', domains[window.location.hostname]]) | ||
var d = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0] | ||
g.async = true g.src = '//cdn.matomo.cloud/ethereumfoundation.matomo.cloud/matomo.js' s.parentNode.insertBefore(g,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.
see this is an example of where problems come with this method...
What I suggest we do is: |
Give the whole project a once over manually linting every file.