-
Notifications
You must be signed in to change notification settings - Fork 191
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR was originally intended to reactivate the performance tests. My plan was to run the tests through Vite, which revealed more inconsistencies with our module setup. This PR continues #1426 by tightening up the lints, adding a number of lints to catch problems that were stopping the built modules from working in the vite setup in the performance suite. All of the lints now run on all packages (previously, the non-published packages had significantly weaker lints), and both the published and non-published packages now share an in-repo linting plugin to keep things consistent. It also tightens up and solidifies the infrastructure that built the packages and .d.ts files. There's still a bit more to do to finalize the exports setup that will be driven by finishing up the performance suite work. Since these changes are standalone improvements, I'm going to land this with the perf suite still disabled.
- Loading branch information
Showing
495 changed files
with
7,532 additions
and
6,285 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
NODE_OPTIONS="--no-warnings" |
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 @@ | ||
NODE_ENV=development |
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 |
---|---|---|
@@ -0,0 +1,82 @@ | ||
// @ts-check | ||
|
||
const { resolve } = require('path'); | ||
|
||
const cjsTsconfig = resolve(__dirname, 'tsconfig.cjs.json'); | ||
|
||
/** @type {import("eslint").Linter.Config} */ | ||
module.exports = { | ||
root: true, | ||
reportUnusedDisableDirectives: true, | ||
extends: [], | ||
ignorePatterns: [ | ||
'dist', | ||
'ts-dist', | ||
'node_modules', | ||
'tmp', | ||
'**/node_modules', | ||
'**/dist', | ||
'**/fixtures', | ||
'!**/.eslintrc.cjs', | ||
], | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
ecmaVersion: 'latest', | ||
project: [], | ||
}, | ||
settings: { | ||
'import/parsers': { | ||
'@typescript-eslint/parser': ['.js', '.cjs', '.mjs', '.mts', '.ts', '.d.ts'], | ||
}, | ||
'import/resolver': { | ||
typescript: {}, | ||
}, | ||
node: { | ||
allowModules: ['@glimmer/debug', '@glimmer/local-debug-flags'], | ||
tryExtensions: ['.js', '.ts', '.d.ts', '.json'], | ||
}, | ||
}, | ||
plugins: [ | ||
'@typescript-eslint', | ||
'prettier', | ||
'qunit', | ||
'simple-import-sort', | ||
'unused-imports', | ||
'prettier', | ||
'n', | ||
], | ||
|
||
rules: {}, | ||
overrides: [ | ||
{ | ||
files: ['.eslintrc.cjs', '**/.eslintrc.cjs'], | ||
parserOptions: { | ||
project: [cjsTsconfig], | ||
}, | ||
extends: [ | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:import/errors', | ||
'plugin:import/typescript', | ||
'plugin:qunit/recommended', | ||
'prettier', | ||
], | ||
rules: { | ||
'@typescript-eslint/no-var-requires': 'off', | ||
}, | ||
}, | ||
|
||
{ | ||
// these packages need to be fixed to avoid these warnings, but in the | ||
// meantime we should not regress the other packages | ||
files: [ | ||
// this specific test imports from @glimmer/runtime (causing a cyclic | ||
// dependency), it should either be refactored to use the interfaces | ||
// directly (instead of the impls) or moved into @glimmer/runtime | ||
'packages/@glimmer/reference/test/template-test.ts', | ||
], | ||
rules: { | ||
'n/no-extraneous-import': 'warn', | ||
}, | ||
}, | ||
], | ||
}; |
Oops, something went wrong.