Skip to content

Commit

Permalink
Restore performance tests (#1427)
Browse files Browse the repository at this point in the history
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
wycats committed May 12, 2023
1 parent 9cbf320 commit 664a746
Show file tree
Hide file tree
Showing 495 changed files with 7,532 additions and 6,285 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
NODE_OPTIONS="--no-warnings"
1 change: 1 addition & 0 deletions .env.testing
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
NODE_ENV=development
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# compiled output
/dist/
**/dist/
/tmp/

# dependencies
/bower_components/
/node_modules/
**/node_modules/
**/.yalc/

# misc
/coverage/
Expand Down
82 changes: 82 additions & 0 deletions .eslintrc.cjs
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',
},
},
],
};
Loading

0 comments on commit 664a746

Please sign in to comment.