Skip to content

Commit

Permalink
fix(eslint): 修改eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
luoxue committed Jan 11, 2020
2 parents 4a8da45 + 807bc12 commit b62943a
Show file tree
Hide file tree
Showing 11 changed files with 2,328 additions and 156 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ dll
dist
.idea
.vscode
coverage
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,6 @@
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
"source.fixAll.eslint": false
}
}
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
## [1.0.9](https://github.com/luoxue-victor/learn_webpack/compare/v1.2.12...v1.0.9) (2020-01-11)

### 📝 文档
范围|描述|commitId
--|--|--
changlog | 修改changelog | [4a8da45](https://github.com/luoxue-victor/learn_webpack/commit/4a8da45)

## [1.2.12](https://github.com/luoxue-victor/learn_webpack/compare/v1.2.11...v1.2.12) (2019-12-27)

范围|描述|commitId
Expand Down
15 changes: 15 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// babel.config.js
module.exports = {
presets: [
[
'@babel/preset-env',
{
targets: {
node: 'current'
}
}
],
'@babel/preset-react',
'@babel/preset-typescript'
]
}
24 changes: 24 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// jest.config.js
module.exports = {
moduleFileExtensions: [
'js',
'jsx'
],
snapshotSerializers: [
'enzyme-to-json/serializer'
],
modulePaths: [
'<rootDir>/packages/react'
],
moduleNameMapper: {
'\\.(css|less|scss|sss|styl)$': '<rootDir>/node_modules/jest-css-modules'
},
testPathIgnorePatterns: [
'/node_modules/'
],
collectCoverage: false,
transform: {
'^.+\\.[t|j]sx?$': 'babel-jest'
},
setupFilesAfterEnv: ['./jest.setup.js']
}
6 changes: 6 additions & 0 deletions jest.setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// jest.setup.js
/* eslint-disable import/no-extraneous-dependencies */
import { configure } from 'enzyme'
import Adapter from 'enzyme-adapter-react-16'

configure({ adapter: new Adapter() })
Loading

0 comments on commit b62943a

Please sign in to comment.