-
-
Notifications
You must be signed in to change notification settings - Fork 204
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
Add gts/gjs configs #1944
Add gts/gjs configs #1944
Changes from all commits
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 |
---|---|---|
@@ -1,6 +1,8 @@ | ||
coverage/ | ||
node_modules | ||
lib/recommended-rules.js | ||
lib/recommended-rules-gjs.js | ||
lib/recommended-rules-gts.js | ||
|
||
# Contains <template> in js markdown | ||
docs/rules/no-empty-glimmer-component-classes.md | ||
docs/rules/no-empty-glimmer-component-classes.md |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
module.exports = { | ||
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. 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. yes, i think it makes sense if want to go this way and provide recommended configs per file type. 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. Yep, seems fine to add |
||
root: true, | ||
|
||
parserOptions: { | ||
ecmaVersion: 2020, | ||
sourceType: 'module', | ||
}, | ||
|
||
env: { | ||
browser: true, | ||
es2020: true, | ||
}, | ||
|
||
plugins: ['ember'], | ||
|
||
overrides: [ | ||
/** | ||
* We don't want to *always* have the preprocessor active, | ||
* it's only relevant on gjs and gts files to detect if eslint config is correctly setup for this files. | ||
*/ | ||
{ | ||
files: ['**/*.{gts,gjs}'], | ||
parser: 'eslint-plugin-ember/gjs-gts-parser', | ||
processor: 'ember/<noop>', | ||
}, | ||
], | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const base = require('./base'); | ||
const gjsRules = require('../recommended-rules-gjs'); | ||
|
||
module.exports = { | ||
...base, | ||
rules: gjsRules, | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const base = require('./base'); | ||
const gtsRules = require('../recommended-rules-gts'); | ||
|
||
module.exports = { | ||
...base, | ||
rules: gtsRules, | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,7 @@ | ||
const base = require('./base'); | ||
const rules = require('../recommended-rules'); | ||
|
||
module.exports = { | ||
root: true, | ||
|
||
parserOptions: { | ||
ecmaVersion: 2020, | ||
sourceType: 'module', | ||
}, | ||
|
||
env: { | ||
browser: true, | ||
es2020: true, | ||
}, | ||
|
||
plugins: ['ember'], | ||
|
||
...base, | ||
rules, | ||
|
||
overrides: [ | ||
/** | ||
* We don't want to *always* have the preprocessor active, | ||
* it's only relevant on gjs and gts files. | ||
* | ||
* Additionally, we need to declare a global (which is private API) | ||
* so that ESLint doesn't report errors about the variable being undefined. | ||
* While this is true, it's a temporary thing for babel to do further processing | ||
* on -- and isn't relevant to user-land code. | ||
*/ | ||
{ | ||
files: ['**/*.gts', '**/*.gjs'], | ||
parser: 'eslint-plugin-ember/gjs-gts-parser', | ||
processor: 'ember/<noop>', | ||
}, | ||
], | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/* | ||
* IMPORTANT! | ||
* This file has been automatically generated. | ||
* In order to update its content based on rules' | ||
* definitions, execute "npm run update" | ||
*/ | ||
module.exports = {} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/* | ||
* IMPORTANT! | ||
* This file has been automatically generated. | ||
* In order to update its content based on rules' | ||
* definitions, execute "npm run update" | ||
*/ | ||
module.exports = {} |
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.
If you add a
description
property to each config, it will show up in this table. Up to you if you think it would be helpful.