-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allowed codemod to set linters for the v2 addon (#82)
* feature: Allowed codemod to set development dependencies for addon * feature: Allowed codemod to configure linters for addon * refactor: Removed unused step * chore: Updated move-project-root-files step * chore: Updated fixtures * chore: Updated README --------- Co-authored-by: ijlee2 <ijlee2@users.noreply.github.com>
- Loading branch information
Showing
188 changed files
with
1,952 additions
and
1,646 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,8 @@ | |
/blueprints/*/files/ | ||
|
||
# compiled output | ||
/declarations/ | ||
/dist/ | ||
/declarations/ | ||
|
||
# misc | ||
/coverage/ |
68 changes: 68 additions & 0 deletions
68
src/blueprints/ember-addon/__addonLocation__/.eslintrc.cjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
'use strict'; | ||
|
||
module.exports = { | ||
root: true, | ||
parser: '<%= options.packages.addon.hasTypeScript ? '@typescript-eslint/parser' : '@babel/eslint-parser' %>', | ||
parserOptions: { | ||
ecmaVersion: 'latest',<% if (!options.packages.addon.hasTypeScript) { %> | ||
sourceType: 'module', | ||
babelOptions: { | ||
root: __dirname, | ||
},<% } %> | ||
}, | ||
plugins: ['ember'], | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:ember/recommended', | ||
'plugin:prettier/recommended', | ||
], | ||
env: { | ||
browser: true, | ||
}, | ||
rules: {}, | ||
overrides: [ | ||
<% if (options.packages.addon.hasTypeScript) { %> // ts files | ||
{ | ||
files: ['**/*.ts', '**/*.gts'], | ||
extends: [ | ||
'plugin:@typescript-eslint/eslint-recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
], | ||
rules: { | ||
// Add any custom rules here | ||
}, | ||
}, | ||
// require relative imports use full extensions | ||
{ | ||
files: ['src/**/*.{js,ts,gjs,gts}'], | ||
rules: { | ||
'import/extensions': ['error', 'always', { ignorePackages: true }], | ||
}, | ||
}, | ||
<% } else { %> // require relative imports use full extensions | ||
{ | ||
files: ['src/**/*.{js,gjs}'], | ||
rules: { | ||
'import/extensions': ['error', 'always', { ignorePackages: true }], | ||
}, | ||
}, | ||
<% } %> // node files | ||
{ | ||
files: [ | ||
'./.eslintrc.cjs', | ||
'./.prettierrc.cjs', | ||
'./.template-lintrc.cjs', | ||
'./addon-main.cjs', | ||
], | ||
parserOptions: { | ||
sourceType: 'script', | ||
}, | ||
env: { | ||
browser: false, | ||
node: true, | ||
}, | ||
plugins: ['n'], | ||
extends: ['plugin:n/recommended'], | ||
}, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,8 @@ | |
/blueprints/*/files/ | ||
|
||
# compiled output | ||
/declarations/ | ||
/dist/ | ||
/declarations/ | ||
|
||
# misc | ||
/coverage/ |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,17 @@ | ||
# The authoritative copies of these live in the monorepo root (because they're | ||
# more useful on github that way), but the build copies them into here so they | ||
# will also appear in published NPM packages. | ||
/LICENSE.md | ||
/README.md | ||
/LICENSE.md | ||
|
||
# compiled output | ||
/declarations | ||
/dist | ||
dist/ | ||
declarations/ | ||
|
||
# npm/pnpm/yarn pack output | ||
*.tgz | ||
|
||
# deps & caches | ||
node_modules/ | ||
.eslintcache | ||
.prettiercache |
21 changes: 21 additions & 0 deletions
21
src/blueprints/ember-addon/__addonLocation__/tsconfig.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"extends": "@tsconfig/ember/tsconfig.json", | ||
"compilerOptions": { | ||
"allowImportingTsExtensions": true, | ||
"allowJs": true, | ||
"declarationDir": "declarations", | ||
"emitDeclarationOnly": true, | ||
"noEmit": false, | ||
"noEmitOnError": false, | ||
"rootDir": "./src" | ||
}, | ||
"include": [ | ||
"src/**/*", | ||
"unpublished-development-types/**/*" | ||
]<% if (options.packages.addon.hasGlint) { %>, | ||
"glint": { | ||
"environment": [ | ||
"ember-loose" | ||
] | ||
}<% } %> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.