Skip to content

Commit

Permalink
Lint and config changes extraction part two (#1502)
Browse files Browse the repository at this point in the history
* Krausest benchmark needs a lint config to properly configure sourceType

* Try to figure out why vm-babel-plugins doesn't appear to be linting correctly

* Get the build working

* Additional ignores

* Fix lints for vm-babel-plugins

* reduceLock

* lint:fix
  • Loading branch information
NullVoxPopuli authored Nov 22, 2023
1 parent c66e4dd commit dead14b
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 6 deletions.
13 changes: 13 additions & 0 deletions benchmark/benchmarks/krausest/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/** @type {import("eslint").Linter.Config} */
module.exports = {
root: false,
overrides: [
{
files: ['**/*.js'],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
},
},
],
};
9 changes: 8 additions & 1 deletion packages/@glimmer-workspace/build/lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,18 @@ export function typescript(pkg, config) {

const ts = tsconfig(typeScriptConfig);

/**
* TODO: migrate off of rollupTS, it has too many bugs
*/
return rollupTS({
transpiler: 'babel',
transpileOnly: true,
babelConfig: { presets },

/**
* This shouldn't be required, but it is.
* If we use @rollup/plugin-babel, we can remove this.
*/
browserslist: [`last 1 chrome versions`],
tsconfig: ts,
});
}
Expand Down
4 changes: 4 additions & 0 deletions packages/@glimmer/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ module.exports = {
'runtime/lib/modifiers/on.ts',
'syntax/lib/parser/tokenizer-event-handlers.ts',
'syntax/lib/get-template-locals.ts',
'syntax/lib/generation/printer.ts',
'syntax/lib/v2/normalize.ts',
'syntax/test/traversal/manipulating-node-test.ts',
'node/lib/node-dom-helper.ts',
],
rules: {
'deprecation/deprecation': 'warn',
Expand Down
4 changes: 2 additions & 2 deletions packages/@glimmer/vm-babel-plugins/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
"devDependencies": {
"@glimmer-workspace/build-support": "workspace:^",
"babel-plugin-tester": "^11.0.4",
"eslint": "^8.52.0",
"mocha": "^10.2.0",
"publint": "^0.2.5",
"rollup": "^3.21.6",
"typescript": "*"
"typescript": "*",
"eslint": "^8.54.0"
},
"main": "index.ts",
"types": "index.ts",
Expand Down
1 change: 1 addition & 0 deletions packages/@glimmer/vm-babel-plugins/test/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fixtures/
4 changes: 4 additions & 0 deletions packages/@glimmer/vm-babel-plugins/test/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,8 @@ module.exports = {
require: true,
__dirname: true,
},
rules: {
'@typescript-eslint/no-require-imports': 'off',
'@typescript-eslint/no-var-requires': 'off',
},
};
2 changes: 0 additions & 2 deletions packages/@glimmer/vm-babel-plugins/test/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable @typescript-eslint/no-var-requires */
/* eslint-disable @typescript-eslint/no-require-imports */
const path = require('node:path');
const pluginTester = require('babel-plugin-tester');

Expand Down
2 changes: 1 addition & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit dead14b

Please sign in to comment.