Skip to content

Commit

Permalink
feat: Migrating to import-resolver-custom-alias
Browse files Browse the repository at this point in the history
  • Loading branch information
mryechkin committed Sep 17, 2023
1 parent 9c962ec commit 09de351
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 38 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ This will install the shared config, as well as its peer dependencies:
- [eslint](https://github.com/eslint/eslint)
- [eslint-config-airbnb](https://www.npmjs.com/package/eslint-config-airbnb)
- [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier)
- [eslint-import-resolver-alias](https://github.com/johvin/eslint-import-resolver-alias)
- [eslint-import-resolver-custom-alias](https://github.com/laysent/eslint-import-resolver-custom-alias)
- [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import)
- [eslint-plugin-jsx-a11y](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y)
- [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier)
Expand Down Expand Up @@ -72,9 +72,9 @@ This config provides a default import alias resolver for `eslint-plugin-import`
```json
{
"import/resolver": {
"alias": {
"map": [["src", "./src"]],
"extensions": [".js", ".jsx"]
"eslint-import-resolver-custom-alias": {
"alias": { "src": "./src" },
"extensions": [".js", ".jsx", ".ts", ".tsx"]
}
}
}
Expand Down Expand Up @@ -102,12 +102,12 @@ This can also be overridden in your local `.eslintrc` file, if needed:
"extends": ["acme"],
"settings": {
"import/resolver": {
"alias": {
"map": [
["lib", "./lib"],
["src", "./some/other/src"]
],
"extensions": [".js"]
"eslint-import-resolver-custom-alias": {
"alias": {
"lib": "./lib",
"src": "./some/other/src"
},
"extensions": [".js", ".jsx", ".ts", ".tsx", ".mdx"]
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ module.exports = {
version: 'detect',
},
'import/resolver': {
alias: {
map: [['src', './src']],
extensions: ['.js', '.jsx'],
'eslint-import-resolver-custom-alias': {
alias: { src: './src' },
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
},
Expand Down
50 changes: 25 additions & 25 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,28 @@
{
"name": "eslint-config-acme",
"version": "2.2.1",
"version": "2.3.0",
"description": "ESLint + Prettier config for React",
"main": "index.js",
"engines": {
"node": ">=15.0.0"
"keywords": [
"eslint",
"eslintconfig",
"config",
"javascript",
"prettier"
],
"homepage": "https://github.com/mryechkin/eslint-config-acme#readme",
"bugs": {
"url": "https://github.com/mryechkin/eslint-config-acme/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/mryechkin/eslint-config-acme.git"
},
"license": "MIT",
"author": {
"name": "Mykhaylo Ryechkin",
"url": "https://github.com/mryechkin"
},
"main": "index.js",
"files": [
"LICENSE",
"CHANGELOG.md",
Expand All @@ -21,7 +38,7 @@
"eslint": "^8.46",
"eslint-config-airbnb": "^19.0",
"eslint-config-prettier": "^8.10",
"eslint-import-resolver-alias": "^1.1",
"eslint-import-resolver-custom-alias": "^1.3.2",
"eslint-plugin-import": "^2.26",
"eslint-plugin-jsx-a11y": "^6.6",
"eslint-plugin-prettier": "^5.0",
Expand All @@ -33,24 +50,7 @@
"prettier": "^3",
"prettier-plugin-tailwindcss": "^0.5"
},
"keywords": [
"eslint",
"eslintconfig",
"config",
"javascript",
"prettier"
],
"author": {
"name": "Mykhaylo Ryechkin",
"url": "https://github.com/mryechkin"
},
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/mryechkin/eslint-config-acme.git"
},
"bugs": {
"url": "https://github.com/mryechkin/eslint-config-acme/issues"
},
"homepage": "https://github.com/mryechkin/eslint-config-acme#readme"
"engines": {
"node": ">=15.0.0"
}
}

0 comments on commit 09de351

Please sign in to comment.