-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(package): update all dependencies
- Loading branch information
Showing
13 changed files
with
185 additions
and
146 deletions.
There are no files selected for viewing
File renamed without changes.
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,94 @@ | ||
/** | ||
* How to install and use | ||
* @link {https://www.arden.nl/setting-up-a-gatsby-js-starter-with-type-script-es-lint-prettier-and-pre-commit-hooks} | ||
* | ||
* Rule documentation | ||
* @link {https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/no-var-requires.md} | ||
*/ | ||
module.exports = { | ||
root: true, | ||
env: { | ||
browser: true, | ||
node: true, | ||
es6: true, | ||
mocha: true, | ||
}, | ||
parser: '@typescript-eslint/parser', | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:@typescript-eslint/recommended-requiring-type-checking', | ||
'plugin:prettier/recommended', | ||
'plugin:import/errors', | ||
'plugin:import/warnings', | ||
'plugin:import/typescript', | ||
'prettier', | ||
'prettier/@typescript-eslint', | ||
], | ||
settings: { | ||
'import/parsers': { | ||
'@typescript-eslint/parser': ['.ts', '.tsx'], | ||
}, | ||
}, | ||
parserOptions: { | ||
project: './tsconfig.eslint.json', | ||
}, | ||
plugins: ['@typescript-eslint', 'import', 'prettier'], | ||
rules: { | ||
'prettier/prettier': 'error', | ||
'import/no-deprecated': ['error'], | ||
'import/order': ['error', { groups: ['builtin', 'external', 'parent', 'sibling', 'index'] }], | ||
'@typescript-eslint/explicit-member-accessibility': ['error', { accessibility: 'no-public' }], | ||
'@typescript-eslint/explicit-function-return-type': ['error'], | ||
'@typescript-eslint/interface-name-prefix': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'@typescript-eslint/no-inferrable-types': 'off', | ||
'@typescript-eslint/no-non-null-assertion': 'off', | ||
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }], | ||
'@typescript-eslint/no-empty-interface': 'off', | ||
'@typescript-eslint/no-require-imports': ['error'], | ||
'@typescript-eslint/no-use-before-define': ['error'], | ||
'@typescript-eslint/camelcase': 'off', | ||
'@typescript-eslint/ban-ts-ignore': 'off', | ||
'@typescript-eslint/require-await': 'off', | ||
'@typescript-eslint/promise-function-async': [ | ||
'error', | ||
{ | ||
allowAny: true, | ||
}, | ||
], | ||
'@typescript-eslint/ban-types': [ | ||
'error', | ||
{ | ||
types: { | ||
Number: { | ||
message: 'Use number instead', | ||
fixWith: 'number', | ||
}, | ||
Function: { | ||
message: 'Use () => void instead', | ||
fixWith: '() => void', | ||
}, | ||
Object: { | ||
message: 'Use object instead', | ||
fixWith: 'object', | ||
}, | ||
String: { | ||
message: 'Use string instead', | ||
fixWith: 'string', | ||
}, | ||
}, | ||
}, | ||
], | ||
}, | ||
overrides: [ | ||
{ | ||
files: ['*.js', '*.jsx'], | ||
rules: { | ||
'@typescript-eslint/no-require-imports': 'off', | ||
'@typescript-eslint/no-var-requires': 'off', | ||
'@typescript-eslint/explicit-function-return-type': 'off', | ||
}, | ||
}, | ||
], | ||
}; |
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
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,5 +1,15 @@ | ||
{ | ||
"ui": "bdd", | ||
"project": "tsconfig.spec.json", | ||
"require": ["ts-node/register", "source-map-support/register", "tsconfig-paths/register", "dotenv-safe/config", "./test/common.opts.ts"] | ||
"project": "tsconfig.json", | ||
"check-leaks": true, | ||
"full-trace": true, | ||
"recursive": true, | ||
"exit": true, | ||
"require": [ | ||
"ts-node/register/transpile-only", | ||
"source-map-support/register", | ||
"tsconfig-paths/register", | ||
"dotenv-safe/config", | ||
"./test/common.opts.ts" | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
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,21 @@ | ||
import { writeFileSync, copyFileSync } from 'fs'; | ||
import originPackage from '../package.json'; | ||
|
||
const distPackage: Record<string, any> = originPackage; | ||
distPackage.module = './index.js'; | ||
distPackage.main = './index.js'; | ||
distPackage.types = './index.d.ts'; | ||
delete distPackage.scripts; | ||
delete distPackage.devDependencies; | ||
delete distPackage.config; | ||
delete distPackage.husky; | ||
delete distPackage.files; | ||
delete distPackage.directories; | ||
delete distPackage['lint-staged']; | ||
|
||
writeFileSync('./dist/package.json', JSON.stringify(distPackage, null, ' ')); | ||
|
||
const copyFiles = ['README.md']; | ||
for (const file of copyFiles) { | ||
copyFileSync(`./${file}`, `./dist/${file}`); | ||
} |
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
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
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
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.