Skip to content

Commit

Permalink
chore: Minor configuration improvement with import rules
Browse files Browse the repository at this point in the history
  • Loading branch information
wottpal committed Dec 12, 2023
1 parent 75a9aa4 commit d4c539d
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 10 deletions.
21 changes: 20 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,25 @@
"rules": {
"no-async-promise-executor": "off",
"react/react-in-jsx-scope": "off",
"@typescript-eslint/no-explicit-any": "off"
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-restricted-imports": [
"error",
{
"paths": [
{
"name": ".",
"message": "Please don't import from global index and use full paths instead."
},
{
"name": "..",
"message": "Please don't import from global index and use full paths instead."
},
{
"name": "@/",
"message": "Please don't import from global index and use full paths instead."
}
]
}
]
}
}
8 changes: 5 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@
"search.useParentIgnoreFiles": true,
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true,
"source.fixAll.eslint": true
"source.organizeImports": "always",
"source.fixAll.eslint": "always"
},
"[javascriptreact][typescriptreact][javascript][typescript][markdown][html][css][scss][sass][json][jsonc][yaml]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"typescript.updateImportsOnFileMove.enabled": "always",
"javascript.updateImportsOnFileMove.enabled": "always"
"javascript.updateImportsOnFileMove.enabled": "always",
"javascript.preferences.importModuleSpecifier": "non-relative",
"typescript.preferences.importModuleSpecifier": "non-relative"
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@
"dev:scripts-example": "pnpm run build && pnpm run -F \"{examples/scripts-ts}\" script",
"node": "substrate-contracts-node --dev --port 9944 --base-path ./.node-data",
"type-check": "tsc --pretty --noEmit",
"lint": "prettier . --check && pnpm eslint",
"lint:fix": "prettier . --write && pnpm eslint --fix",
"lint": "prettier . --check && pnpm eslint .",
"lint:fix": "prettier . --write && pnpm eslint . --fix",
"lint:format": "prettier . --write",
"typedoc": "typedoc src/index.ts --titleLink \"https://github.com/scio-labs/use-inkathon\"",
"changeset:version": "pnpm run typedoc && changeset version",
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/getDeployment.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SubstrateDeployment } from '@/types/'
import { SubstrateDeployment } from '@/types'
import { ApiPromise } from '@polkadot/api'
import { ContractPromise } from '@polkadot/api-contract'

Expand Down
2 changes: 1 addition & 1 deletion src/registry.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SubstrateDeployment } from '@/types/'
import { SubstrateDeployment } from '@/types'
import { Dispatch, SetStateAction } from 'react'

/**
Expand Down
3 changes: 1 addition & 2 deletions src/types/UseInkathonProviderContext.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { SubstrateWallet } from '@/types'
import { SubstrateChain } from '@/types/SubstrateChain'
import { SubstrateChain, SubstrateWallet } from '@/types'
import { ApiPromise, HttpProvider, WsProvider } from '@polkadot/api'
import { InjectedAccount, InjectedExtension } from '@polkadot/extension-inject/types'
import { Signer } from '@polkadot/types/types'
Expand Down

0 comments on commit d4c539d

Please sign in to comment.