-
Notifications
You must be signed in to change notification settings - Fork 69
chore: enable eslint for the repo config #65
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
chore: enable eslint for the repo config #65
Conversation
464ece5
into
mrgrain/chore/re-add-linter-rules
| // Require all imported dependencies are actually declared in package.json | ||
| 'import/no-extraneous-dependencies': [ | ||
| 'error', | ||
| { | ||
| devDependencies: [ // Only allow importing devDependencies from: | ||
| '**/build-tools/**', // --> Build tools | ||
| '**/test/**', // --> Unit tests | ||
| ], | ||
| optionalDependencies: false, // Disallow importing optional dependencies (those shouldn't be in use in the project) | ||
| }, | ||
| ], | ||
|
|
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.
Removed this in favor of the projen built-in rule, which is pretty much the same but allows for a dynamic configuration of the paths in devDependencies.
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.
Change here and in the other package lint configs are due to now using the projen built-in rule for import/no-extraneous-dependencies.
As you can see these are pretty much the same. The main difference is that we now allow imports of peerDependencies which seems acceptable if not desired.
| // Eslint for projen config | ||
| // @ts-ignore | ||
| repoProject.eslint = new pj.javascript.Eslint(repoProject, { | ||
| tsconfigPath: `./${repoProject.tsconfigDev.fileName}`, | ||
| dirs: [], | ||
| devdirs: ['projenrc', '.projenrc.ts'], | ||
| fileExtensions: ['.ts', '.tsx'], | ||
| lintProjenRc: false, | ||
| }); | ||
|
|
||
| const repo = configureProject(repoProject); |
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 is the only actual change in here: We are adding a custom eslint config for the repo root.
Fixes #
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license