Skip to content

Commit

Permalink
upgrade 2.3.2 (#322)
Browse files Browse the repository at this point in the history
* upgrade 2.3.2

* updated snapshot

* updated travis yaml & added lintaged
  • Loading branch information
kidjp85 committed Jul 24, 2019
1 parent d5f248a commit cea8c95
Show file tree
Hide file tree
Showing 12 changed files with 1,537 additions and 628 deletions.
59 changes: 59 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"parser": "@typescript-eslint/parser",
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"prettier/@typescript-eslint",
"plugin:prettier/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript",
"plugin:jest/recommended"
],
"plugins": ["react", "@typescript-eslint", "prettier", "react-hooks"],
"env": {
"browser": true,
"jest": true,
"amd": true,
"node": true,
"es6": true
},
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"rules": {
"import/no-unresolved": "error",
"import/order": "error",
"import/named": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-explicit-any": ["off"],
"react/display-name": ["off"],
"prettier/prettier": ["error", {
"singleQuote": true,
"printWidth": 100,
"semi": true
}]
},
"overrides": [{
"files": ["**/*.tsx"],
"rules": {
"react/prop-types": "off"
}
}],
"settings": {
"react": {
"version": "detect"
},
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
},
"import/resolver": {
"typescript": {}
}
}
}
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ install:
script:
- yarn test
- yarn test:coverage
- yarn lint
- yarn lint:ts
after_script: "cat ./coverage/lcov.info | $(npm bin)/codecov"
branches:
only:
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log for React-id-swiper

## [v2.3.2](https://github.com/kidjp85/react-id-swiper/compare/2.3.2...2.3.1) - Released on July 24th, 2019
* Upgrade npm packages
* Replace `tslint` with `eslint`

## [v2.3.1](https://github.com/kidjp85/react-id-swiper/compare/2.3.1...2.3.0) - Released on June 27th, 2019
* Fix bug [276](https://github.com/kidjp85/react-id-swiper/issues/276) for rebuildOnUpdate and shouldSwiperUpdate not working properly.

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

[![Package Quality](http://npm.packagequality.com/badge/react-id-swiper.png)](http://packagequality.com/#?package=react-id-swiper)

react-id-swiper ( Newest version 2.3.1 )
react-id-swiper ( Newest version 2.3.2 )
========================================
> A library to use [Swiper](http://www.idangero.us/swiper/get-started/) as a ReactJs component
Expand Down Expand Up @@ -74,11 +74,11 @@ yarn add react-id-swiper@latest swiper@latest
## CDN

```html
<script src="https://unpkg.com/react-id-swiper@2.3.1/lib/react-id-swiper.js"></script>
<script src="https://unpkg.com/react-id-swiper@2.3.2/lib/react-id-swiper.js"></script>
```

```html
<script src="https://unpkg.com/react-id-swiper@2.3.1/lib/react-id-swiper.min.js"></script>
<script src="https://unpkg.com/react-id-swiper@2.3.2/lib/react-id-swiper.min.js"></script>
```

# Styling
Expand Down
52 changes: 35 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-id-swiper",
"version": "2.3.1",
"version": "2.3.2",
"description": "ReactJs component for iDangerous Swiper",
"main": "lib/index",
"types": "lib/index.d.ts",
Expand All @@ -12,8 +12,8 @@
"build:lib": "yarn build:cleanup && tsc",
"build:standalone": "cross-env BABEL_ENV=production webpack",
"build": "yarn build:lib && yarn build:standalone && yarn copy:stylesheet",
"lint": "tslint --project tslint.json 'src/**/*.ts?(x)'",
"lint:fix": "tslint --fix --project tslint.json 'src/**/*.ts?(x)'",
"lint:ts": "eslint 'src/**/*.ts?(x)'",
"lint:ts:fix": "eslint --fix 'src/**/*.ts?(x)'",
"copy:package": "cp -rf package.json lib",
"copy:stylesheet": "cp -rf src/styles lib",
"test": "jest",
Expand All @@ -35,6 +35,17 @@
"type": "git",
"url": "git://github.com/kidjp85/react-id-swiper.git"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.{ts,tsx}": [
"eslint",
"git add"
]
},
"bugs": {
"url": "https://github.com/kidjp85/react-id-swiper/issues"
},
Expand All @@ -47,43 +58,50 @@
"swiper": ">=4.0.0"
},
"devDependencies": {
"@babel/core": "^7.4.5",
"@babel/core": "^7.5.5",
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
"@babel/preset-env": "^7.4.5",
"@babel/preset-env": "^7.5.5",
"@babel/preset-react": "^7.0.0",
"@types/enzyme": "^3.9.4",
"@types/enzyme": "^3.10.3",
"@types/enzyme-adapter-react-16": "^1.0.5",
"@types/jest": "^24.0.15",
"@types/jsdom": "^12.2.4",
"@types/object-assign": "^4.0.30",
"@types/react": "^16.8.22",
"@types/react-dom": "^16.8.4",
"@types/react": "^16.8.23",
"@types/react-dom": "^16.8.5",
"@types/swiper": "^4.4.3",
"@typescript-eslint/eslint-plugin": "^1.13.0",
"@typescript-eslint/parser": "^1.13.0",
"awesome-typescript-loader": "^5.2.1",
"babel-jest": "^24.8.0",
"babel-plugin-dynamic-import-node": "^2.3.0",
"cross-env": "^5.2.0",
"enzyme": "^3.10.0",
"enzyme-adapter-react-16": "^1.14.0",
"enzyme-to-json": "^3.3.5",
"eslint": "^6.1.0",
"eslint-config-prettier": "^6.0.0",
"eslint-config-react": "^1.1.7",
"eslint-import-resolver-typescript": "^1.1.1",
"eslint-plugin-import": "^2.18.0",
"eslint-plugin-jest": "^22.11.1",
"eslint-plugin-prettier": "^3.1.0",
"eslint-plugin-react": "^7.14.2",
"eslint-plugin-react-hooks": "^1.6.1",
"husky": "^3.0.1",
"jest": "^24.8.0",
"lint-staged": "^9.2.0",
"prettier": "^1.18.2",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"rimraf": "^2.6.3",
"swiper": "^4.5.0",
"ts-jest": "^24.0.2",
"ts-loader": "^6.0.4",
"tslint": "^5.18.0",
"tslint-config-airbnb": "^5.11.1",
"tslint-config-prettier": "^1.18.0",
"tslint-loader": "^3.5.4",
"tslint-plugin-prettier": "^2.0.1",
"tslint-react": "^4.0.0",
"typescript": "^3.5.2",
"typescript": "^3.5.3",
"uglifyjs-webpack-plugin": "^2.1.3",
"webpack": "^4.35.0",
"webpack-cli": "^3.3.5"
"webpack": "^4.37.0",
"webpack-cli": "^3.3.6"
},
"jest": {
"resetMocks": true,
Expand Down
16 changes: 0 additions & 16 deletions src/tests/ReactISwiper.custom.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,22 +156,6 @@ describe('ReactIdSwiperCustom', () => {
});
});

describe('Parallax', () => {
const params = {
Swiper,
modules: [Parallax],
parallax: true,
parallaxEl: {
el: '.parallax-bg',
value: '-23%'
}
};

test('it should render parallax', () => {
expect(renderSwiper(params)).toMatchSnapshot();
});
});

describe('Scrollbar', () => {
const params = {
Swiper,
Expand Down
14 changes: 0 additions & 14 deletions src/tests/ReactIdSwiper.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,20 +146,6 @@ describe('ReactIdSwiper', () => {
});
});

describe('Parallax', () => {
const params = {
parallax: true,
parallaxEl: {
el: '.parallax-bg',
value: '-23%'
}
};

test('it should render parallax', () => {
expect(renderSwiper(params)).toMatchSnapshot();
});
});

describe('Scrollbar', () => {
const params = {
scrollbar: {
Expand Down
25 changes: 0 additions & 25 deletions src/tests/__snapshots__/ReactISwiper.custom.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -238,31 +238,6 @@ exports[`ReactIdSwiperCustom rendering snapshot Parallax it should render parall
</div>
`;

exports[`ReactIdSwiperCustom rendering snapshot Parallax it should render parallax 2`] = `
<div
class="swiper-container"
>
<div
class="parallax-bg"
data-swiper-parallax="-23%"
/>
<div
class="swiper-wrapper"
>
<div
class="swiper-slide"
>
Slide 1
</div>
<div
class="swiper-slide"
>
Slide 2
</div>
</div>
</div>
`;

exports[`ReactIdSwiperCustom rendering snapshot RTL it should render with rtl 1`] = `
<div
class="swiper-container"
Expand Down
25 changes: 0 additions & 25 deletions src/tests/__snapshots__/ReactIdSwiper.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -241,31 +241,6 @@ exports[`ReactIdSwiper rendering snapshot Parallax it should render parallax 1`]
</div>
`;

exports[`ReactIdSwiper rendering snapshot Parallax it should render parallax 2`] = `
<div
class="swiper-container"
>
<div
class="parallax-bg"
data-swiper-parallax="-23%"
/>
<div
class="swiper-wrapper"
>
<div
class="swiper-slide"
>
Slide 1
</div>
<div
class="swiper-slide"
>
Slide 2
</div>
</div>
</div>
`;

exports[`ReactIdSwiper rendering snapshot RTL it should render with rtl 1`] = `
<div
class="swiper-container"
Expand Down
2 changes: 1 addition & 1 deletion src/tests/utils.test.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { FunctionComponent } from 'react';
import { Pagination, Navigation, Scrollbar, Parallax } from 'swiper/dist/js/swiper.esm';
import { classNames, validateChildren, isReactElement, isModuleAvailable } from '../utils';
import { mount } from 'enzyme';
import { classNames, validateChildren, isReactElement, isModuleAvailable } from '../utils';

describe('utils', () => {
describe('classnames', () => {
Expand Down
69 changes: 0 additions & 69 deletions tslint.json

This file was deleted.

Loading

0 comments on commit cea8c95

Please sign in to comment.