Skip to content

Commit

Permalink
Revert "Improved Resolution Handling (#9)"
Browse files Browse the repository at this point in the history
This reverts commit 6a99344.
  • Loading branch information
bradennapier authored Jul 15, 2020
1 parent 6a99344 commit 37f8681
Show file tree
Hide file tree
Showing 10 changed files with 283 additions and 423 deletions.
22 changes: 0 additions & 22 deletions .github/workflows/lint_pr.yml

This file was deleted.

9 changes: 4 additions & 5 deletions .github/workflows/pull_request_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,14 @@ jobs:

strategy:
matrix:
node: [10.x, 12.x, 14.x]
node-version: [10.x, 12.x, 14.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v2.0.0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
check-latest: true
node-version: ${{ matrix.node-version }}
- name: npm install, build, and test
run: |
yarn install --pure-lockfile
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2.0.0
uses: actions/setup-node@v1
with:
node-version: 12
- name: Install dependencies
Expand Down
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
- Provide import patterns that restrict imports of certain files based on location.
- Ensure imports meet the expected guidelines within your repo.
- Adapted from VSCode's rule `code-import-patterns`.
- Works with configured `paths` from your `tsconfig.json`
- Provide custom eslint messaging for each pattern if needed.
- Useful in monorepos and most Typescript projects which utilize incremental builds.

Expand All @@ -60,6 +59,10 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.lint.json',
sourceType: 'module',
},
rules: {
'ts-import/patterns': [
'error',
Expand Down Expand Up @@ -92,10 +95,13 @@ module.exports = {
},
],
},
plugins: ['ts-import']
plugins: ['ts-import'],
settings: {
'import/resolver': {
typescript: {
directory: 'tsconfig.lint.json',
},
},
},
}
```

## Special Thanks

- While originally utilizing custom logic, we since borrowed the resolving method used by [eslint-import-resolver-typescript](https://github.com/alexgorbatchev/eslint-import-resolver-typescript).
51 changes: 31 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,48 +34,40 @@
"test": "echo Tests TODO"
},
"peerDependencies": {
"eslint": ">= 6 < 8",
"typescript": ">= 3"
"eslint": "^7.2.0",
"typescript": "^3.9.5"
},
"dependencies": {
"debug": "^4.1.1",
"fast-glob": "^3.2.4",
"is-glob": "^4.0.1",
"@zerollup/ts-helpers": "^1.7.18",
"minimatch": "^3.0.4",
"resolve": "^1.17.0",
"tsconfig-paths": "^3.9.0",
"tslib": "^2.0.0"
},
"devDependencies": {
"@semantic-release/changelog": "^5.0.1",
"@semantic-release/git": "^9.0.0",
"@semantic-release/npm": "^7.0.5",
"@types/debug": "^4.1.5",
"@types/eslint": "^7.2.0",
"@types/is-glob": "^4.0.1",
"@types/minimatch": "^3.0.3",
"@types/resolve": "^1.17.1",
"@typescript-eslint/eslint-plugin": "^3.6.1",
"@typescript-eslint/experimental-utils": "^3.6.1",
"@typescript-eslint/parser": "^3.6.1",
"@typescript-eslint/eslint-plugin": "^3.3.0",
"@typescript-eslint/parser": "^3.3.0",
"@typescript-eslint/experimental-utils": "^3.3.0",
"commitizen": "^4.1.2",
"eslint": "^7.4.0",
"eslint": "^7.2.0",
"eslint-config-airbnb-base": "^14.2.0",
"eslint-config-prettier": "^6.11.0",
"eslint-import-resolver-typescript": "^2.0.0",
"eslint-plugin-flowtype": "^5.2.0",
"eslint-plugin-import": "^2.22.0",
"eslint-plugin-flowtype": "^5.1.3",
"eslint-plugin-import": "^2.21.2",
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-promise": "^4.2.1",
"gh-pages": "^3.1.0",
"gh-pages": "^3.0.0",
"git-cz": "^4.7.0",
"husky": "^4.2.5",
"lint-staged": "^10.2.11",
"prettier": "^2.0.5",
"rimraf": "^3.0.2",
"semantic-release": "^17.1.1",
"semantic-release": "^17.0.8",
"ts-node": "^8.10.2",
"typescript": "^3.9.6"
"typescript": "^3.9.5"
},
"files": [
"lib/",
Expand All @@ -92,6 +84,25 @@
"path": "git-cz"
}
},
"release": {
"branches": [
"master",
{
"name": "next",
"prerelease": "rc"
}
],
"verifyConditions": [
"@semantic-release/changelog",
"@semantic-release/npm",
"@semantic-release/git"
],
"prepare": [
"@semantic-release/changelog",
"@semantic-release/npm",
"@semantic-release/git"
]
},
"lint-staged": {
"src/**/*.{ts,tsx}": [
"eslint --fix"
Expand Down
26 changes: 0 additions & 26 deletions release.config.js

This file was deleted.

Loading

0 comments on commit 37f8681

Please sign in to comment.