Skip to content

Commit

Permalink
ESLint v8 support (#246)
Browse files Browse the repository at this point in the history
* Upgrade eslint and typescript eslint

* Add temporary Jest resolver

* Update tests for new ESLint export
  • Loading branch information
tclindner committed Dec 4, 2021
1 parent 1fc967f commit 61487fb
Show file tree
Hide file tree
Showing 5 changed files with 447 additions and 391 deletions.
12 changes: 12 additions & 0 deletions export-maps-resolver.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// TODO: Remove workaround for https://github.com/facebook/jest/issues/9771
// after Jest v28 is released.
// eslint-disable-next-line import/no-extraneous-dependencies, @typescript-eslint/no-var-requires
const enhancedResolve = require('enhanced-resolve');

const resolver = enhancedResolve.create.sync({
conditionNames: ['require', 'node', 'default'],
extensions: ['.js', '.json'],
mainFields: ['exports', 'main', 'require'],
});

module.exports = (request, options) => resolver(options.basedir, request);
3 changes: 3 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
resolver: './export-maps-resolver.js',
};
Loading

0 comments on commit 61487fb

Please sign in to comment.