This repository has been archived by the owner on Sep 30, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(types)!: polkadot/api to v4 w. esm; Use substrate/dev for build (#…
…404) * fix(types)!: polkadot/api to v4 w. esm; Use substrate/dev for build BREAKING CHANGE Emitted .js is now es2020, requiring node >= 12. ## Changes - Use @substrate/dev for build configuration - new tsconfig.json targets es2019 - prettier is now uses hard tabs and 2 spaces, which causes the huge diff - some slight type annotations where necessary for claims.ts and method.ts in order to pass the stricter tsconfig - Babel is now used to transpile the @polkadot/* packages `.js` from ESM to CJS for jest
- Loading branch information
Showing
115 changed files
with
3,346 additions
and
3,306 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1 @@ | ||
module.exports = { | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:@typescript-eslint/recommended-requiring-type-checking', | ||
'prettier', | ||
'plugin:prettier/recommended' | ||
], | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
project: './tsconfig.json' | ||
}, | ||
plugins: [ | ||
'@typescript-eslint', | ||
'prettier', | ||
'simple-import-sort' | ||
], | ||
rules: { | ||
// Sort imports and exports | ||
'simple-import-sort/imports': 'error', | ||
'simple-import-sort/exports': 'error', | ||
// https://github.com/eslint/eslint/issues/2321#issuecomment-134665757 | ||
// 'no-unused-vars': [2, { args: 'all', argsIgnorePattern: '^_' }], | ||
'@typescript-eslint/no-unused-vars': [ | ||
2, | ||
{ args: 'all', argsIgnorePattern: '^_' } | ||
], | ||
"@typescript-eslint/ban-types": 0, | ||
}, | ||
}; | ||
module.exports = require('@substrate/dev/config/eslint'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1 @@ | ||
module.exports = { | ||
semi: true, | ||
singleQuote: true, | ||
tabWidth: 2, | ||
useTabs: false, | ||
}; | ||
module.exports = require('@substrate/dev/config/prettier'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = require("@substrate/dev/config/babel"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.