Skip to content

Commit

Permalink
Merge pull request #322 from reduxjs/feature/ts-conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
markerikson committed Oct 24, 2021
2 parents ec25d85 + cfd2844 commit a5c48e3
Show file tree
Hide file tree
Showing 20 changed files with 10,564 additions and 8,125 deletions.
9 changes: 0 additions & 9 deletions .babelrc

This file was deleted.

19 changes: 19 additions & 0 deletions .babelrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const { NODE_ENV, BABEL_ENV } = process.env
const cjs = NODE_ENV === 'test' || BABEL_ENV === 'commonjs'

module.exports = {
presets: [
[
'@babel/preset-env',
{
targets: {
ie: 11
},
loose: true,
modules: cjs ? 'cjs' : false
}
],
'@babel/preset-typescript'
],
plugins: [cjs && ['@babel/transform-modules-commonjs']].filter(Boolean)
}
9 changes: 7 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"extends": [
"eslint-config-airbnb",
"prettier",
"plugin:@typescript-eslint/recommended"
],
Expand All @@ -21,6 +20,12 @@
"no-use-before-define": [2, "nofunc"],
"no-unused-expressions": 0,
"import/no-unresolved": 0,
"import/named": 0
"import/named": 0,
"@typescript-eslint/ban-ts-ignore": 0,
"@typescript-eslint/explicit-function-return-type": 0,
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/member-delimiter-style": 0,
"@typescript-eslint/no-use-before-define": 1,
"@typescript-eslint/camelcase": 0
}
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ coverage
lib
dist
es
builds/
7 changes: 7 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"semi": false,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "none",
"arrowParens": "avoid"
}
14 changes: 14 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/** @type {import('@ts-jest/dist/types').InitialOptionsTsJest} */

module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
coverageDirectory: './coverage/',
collectCoverage: true,
testRegex: 'test/test.ts',
globals: {
'ts-jest': {
tsconfig: './test/tsconfig.json',
},
},
};
Loading

0 comments on commit a5c48e3

Please sign in to comment.