Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESLint v8 support #409

Merged
merged 5 commits into from
Dec 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ First thing first, let's make sure you have the necessary pre-requisites.
npx install-peerdeps --dev eslint-config-tc
```

> eslint, eslint-plugin-eslint-comments, eslint-plugin-import, eslint-plugin-jest, eslint-plugin-prettier, eslint-plugin-unicorn, and prettier are peer dependencies and must be installed.
> eslint, eslint-plugin-import, eslint-plugin-jest, eslint-plugin-prettier, eslint-plugin-unicorn, and prettier are peer dependencies and must be installed.

## Usage

Expand Down
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
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);
2 changes: 0 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ module.exports = {
extends: [
'eslint-config-airbnb-base',
'eslint:recommended',
'plugin:eslint-comments/recommended',
'plugin:jest/recommended',
'plugin:unicorn/recommended',
'eslint-config-prettier',
Expand Down Expand Up @@ -45,7 +44,6 @@ module.exports = {
rules: {
'array-bracket-newline': 'off',
'array-element-newline': 'off',
'eslint-comments/no-unused-disable': 'error',
'id-length': 'off',
'max-lines': 'off',
'max-lines-per-function': 'off',
Expand Down
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