Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 19 additions & 3 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,17 @@
}
},
"rules": {
"template-curly-spacing": [
"off"
],
"indent": [
"error",
4,
{
"SwitchCase": 1
"SwitchCase": 1,
"ignoredNodes": [
"TemplateLiteral"
]
}
],
"comma-dangle": [
Expand Down Expand Up @@ -70,7 +76,6 @@
}],
"jest/no-disabled-tests": "error",
"jest/no-focused-tests": "error",
"jest/no-hooks": "warn",
"jest/no-identical-title": "error",
"jest/no-jest-import": "error",
"jest/prefer-to-have-length": "warn",
Expand All @@ -81,7 +86,18 @@
"jsx-a11y/label-has-for": 0,
"jsx-a11y/click-events-have-key-events": 0,
"jsx-a11y/no-static-element-interactions": 0,
"jsx-a11y/no-noninteractive-element-interactions": 0
"jsx-a11y/no-noninteractive-element-interactions": 0,
"react/jsx-props-no-spreading": 0,
"react/jsx-fragments": 0,
"react/static-property-placement": 0,
"react/sort-comp": 0,
"react/jsx-curly-newline": 0,
"react/state-in-constructor": 0,
"no-mixed-operators": 0,
"arrow-parens": 0,
"camelcase": 0,
"max-classes-per-file": 0,
"jest/no-hooks": 0
},
"plugins": [
"react",
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ typings/

# Visual Studio
.vscode/
.history/

# Miscellaneous cache files
.DS_Store
Expand Down
2 changes: 0 additions & 2 deletions config/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,5 @@ module.exports = {
* to `package.json`'s `dependencies`.
*/
additionalDependencies: [
// we ony use one function from date-fns
'date-fns/distance_in_words_strict',
],
};
6 changes: 3 additions & 3 deletions config/rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import fs from 'fs-extra';
import glob from 'glob';
import babel from 'rollup-plugin-babel';
import resolve from 'rollup-plugin-node-resolve';
import resolve from '@rollup/plugin-node-resolve';
import postprocess from 'rollup-plugin-postprocess';
import sass from 'rollup-plugin-sass';
import commonjs from 'rollup-plugin-commonjs';
import string from 'rollup-plugin-string/dist/rollup-plugin-string';
import commonjs from '@rollup/plugin-commonjs';
import { string } from 'rollup-plugin-string';
import svg from 'rollup-plugin-react-svg';

const config = require('./config');
Expand Down
1 change: 0 additions & 1 deletion docs/build/1.1c19e957.js

This file was deleted.

1 change: 1 addition & 0 deletions docs/build/1.473e5f0c.js

Large diffs are not rendered by default.

71 changes: 71 additions & 0 deletions docs/build/bundle.09de56a6.js

Large diffs are not rendered by default.

72 changes: 0 additions & 72 deletions docs/build/bundle.b9f3113a.js

This file was deleted.

2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html><html><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge"><title>react-common</title><link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Rubik:300,300i,400,400i,500,500i,700,700i,900,900i&display=swap"></head><body><div id="rsg-root"></div><div id="app"></div><script src="build/bundle.b9f3113a.js"></script></body></html>
<!DOCTYPE html><html><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge"><title>react-common</title><link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Rubik:300,300i,400,400i,500,500i,700,700i,900,900i&display=swap"></head><body><div id="rsg-root"></div><div id="app"></div><script src="build/bundle.09de56a6.js"></script></body></html>
123 changes: 61 additions & 62 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"git:reset": "git checkout master && git pull",
"lib:build": "rollup -c config/rollup.config.js",
"lint": "yarn lint:js && yarn lint:css",
"lint:css": "stylelint \"source/components/*.scss\" \"source/components/*.css\"",
"lint:fix": "stylelint \"source/components/*.scss\" \"source/components/*.css\" --fix",
"lint:css": "stylelint \"source/components/**/*.scss\" \"source/components/**/*.css\"",
"lint:fix": "stylelint \"source/components/**/*.scss\" \"source/components/**/*.css\" --fix",
"lint:js": "eslint --cache .",
"extract-assets-from-ds": "node ./scripts/extract-assets-from-ds.js && yarn generate-icons-demo",
"generate-icons-demo": "node ./scripts/generate-icons-demo.js",
Expand All @@ -37,82 +37,81 @@
"dependencies": {
"classnames": "^2.2.6",
"color": "^3.1.2",
"date-fns": "^1.29.0",
"design-system": "git://github.com/Wikia/design-system.git#22.8.0",
"i18next": "^14.0.1",
"i18next": "^19.3.2",
"immutable": "^4.0.0-rc.12",
"lodash": "^4.17.11",
"prop-types": "^15.6.2",
"react": "^16.8.3",
"react-dom": "^16.8.3",
"react-i18next": "^10.0.0",
"lodash": "^4.17.15",
"prop-types": "^15.7.2",
"react": "^16.13.0",
"react-dom": "^16.13.0",
"react-i18next": "^11.3.3",
"react-redux": "^5.0.7",
"react-select": "^2.1.1",
"react-select": "^3.0.8",
"styled-components": "^4.1.3"
},
"devDependencies": {
"@babel/core": "^7.1.6",
"@babel/node": "^7.0.0",
"@babel/plugin-external-helpers": "^7.0.0",
"@babel/plugin-proposal-class-properties": "^7.1.0",
"@babel/plugin-proposal-export-default-from": "^7.2.0",
"@babel/plugin-proposal-object-rest-spread": "^7.0.0",
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
"@babel/preset-env": "^7.0.0",
"@babel/preset-react": "^7.0.0",
"@babel/core": "^7.8.7",
"@babel/node": "^7.8.7",
"@babel/plugin-external-helpers": "^7.8.3",
"@babel/plugin-proposal-class-properties": "^7.8.3",
"@babel/plugin-proposal-export-default-from": "^7.8.3",
"@babel/plugin-proposal-object-rest-spread": "^7.8.3",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/preset-env": "^7.8.7",
"@babel/preset-react": "^7.8.3",
"@rollup/plugin-commonjs": "^11.0.2",
"@rollup/plugin-node-resolve": "^7.1.1",
"babel-core": "^7.0.0-bridge.0",
"babel-eslint": "^10.0.1",
"babel-jest": "^23.6.0",
"babel-loader": "^8.0.4",
"babel-plugin-styled-components": "^1.10.0",
"concurrently": "^4.1.0",
"coveralls": "^3.0.2",
"enzyme": "^3.10.0",
"enzyme-adapter-react-16": "^1.14.0",
"babel-eslint": "^10.1.0",
"babel-jest": "^25.1.0",
"babel-loader": "^8.0.6",
"babel-plugin-styled-components": "^1.10.7",
"concurrently": "^5.1.0",
"coveralls": "^3.0.9",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.2",
"enzyme-redux": "^0.2.1",
"enzyme-to-json": "^3.3.5",
"eslint": "^5.9.0",
"eslint-config-airbnb": "^17.1.0",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-jest": "^22.0.0",
"eslint-plugin-jsx-a11y": "^6.1.2",
"eslint-plugin-react": "^7.11.1",
"fs-extra": "^7.0.1",
"glob": "^7.1.3",
"enzyme-to-json": "^3.4.4",
"eslint": "^6.8.0",
"eslint-config-airbnb": "^18.0.1",
"eslint-plugin-import": "^2.20.1",
"eslint-plugin-jest": "^23.8.2",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-react": "^7.18.3",
"fs-extra": "^8.1.0",
"glob": "^7.1.6",
"identity-obj-proxy": "^3.0.0",
"jest": "^24.8.0",
"mkdirp": "^0.5.1",
"node-sass": "^4.10.0",
"jest": "^25.1.0",
"mkdirp": "^1.0.3",
"node-sass": "^4.13.1",
"path": "^0.12.7",
"postcss-modules": "^1.4.1",
"raw-loader": "^1.0.0",
"raw-loader": "^4.0.0",
"react-docgen": "3.0.0",
"react-styleguidist": "^8.0.6",
"react-svg-loader": "^2.1.0",
"react-test-renderer": "^16.8.3",
"redux": "^4.0.0",
"react-svg-loader": "^3.0.3",
"react-test-renderer": "^16.13.0",
"redux": "^4.0.5",
"redux-test-utils": "^0.3.0",
"rimraf": "^2.6.2",
"rollup": "^0.68.0",
"rollup-plugin-babel": "^4.0.3",
"rollup-plugin-commonjs": "^9.2.0",
"rollup-plugin-node-resolve": "^4.0.0",
"rollup-plugin-postcss": "^2.0.0",
"rimraf": "^3.0.2",
"rollup": "^1.20.0",
"rollup-plugin-babel": "^4.3.3",
"rollup-plugin-postcss": "^2.2.0",
"rollup-plugin-postprocess": "^1.0.2",
"rollup-plugin-react-svg": "^2.1.0",
"rollup-plugin-sass": "^1.0.0",
"rollup-plugin-string": "^2.0.2",
"rollup-plugin-svg": "^1.0.1",
"sass-loader": "^7.1.0",
"semver": "^5.6.0",
"sinon": "^7.1.1",
"stylelint": "^9.8.0",
"rollup-plugin-react-svg": "^3.0.3",
"rollup-plugin-sass": "^1.2.2",
"rollup-plugin-string": "^3.0.0",
"rollup-plugin-svg": "^2.0.0",
"sass-loader": "^8.0.2",
"semver": "^7.1.3",
"sinon": "^9.0.0",
"stylelint": "^13.2.0",
"stylelint-config-fandom": "git://github.com/Wikia/stylelint-config-fandom.git#0.0.1",
"stylelint-order": "^2.0.0",
"stylelint-scss": "^3.4.0",
"waait": "^1.0.4",
"webpack": "^4.26.0",
"webpack-cli": "^3.1.2"
"stylelint-order": "^4.0.0",
"stylelint-scss": "^3.14.2",
"waait": "^1.0.5",
"webpack": "^4.42.0",
"webpack-cli": "^3.3.11"
},
"publishConfig": {
"registry": "https://artifactory.wikia-inc.com/artifactory/api/npm/wikia-npm/"
Expand Down
1 change: 1 addition & 0 deletions source/components/Avatar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class Avatar extends React.Component {

componentDidMount() {
if (!this.state.imageSrc && this.props.userId) {
// eslint-disable-next-line
fetch(`https://services.wikia.com/user-attribute/user/${this.props.userId}/attr/avatar`)
.then(response => response.json())
.then(data => this.setState({ imageSrc: data.value }));
Expand Down
1 change: 1 addition & 0 deletions source/components/Avatar/styles.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@import "~design-system/dist/scss/wds-mixins/index.scss";
@import "~design-system/dist/scss/wds-variables/index.scss";
@import "~design-system/dist/scss/wds-components/_avatar.scss";

.wds-avatar {
@include wds-avatar(48px, $wds-fandom-color-mid-light-gray, $wds-fandom-color-mid-light-gray);
}
3 changes: 2 additions & 1 deletion source/components/Checkbox/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
display: inline-flex;
}

&__icon, &__lock-icon {
&__icon,
&__lock-icon {
margin-right: 13px;
}

Expand Down
2 changes: 1 addition & 1 deletion source/components/ExpandableText/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default class ExpandableText extends React.Component {
};
}

componentWillReceiveProps(newProps) {
UNSAFE_componentWillReceiveProps(newProps) {
const shortText = makeShortText(newProps.text, newProps.characterLimit);

this.setState({
Expand Down
1 change: 0 additions & 1 deletion source/components/ExpandableText/styles.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.expandable-text {

&__expand {
/* unstyle button */
background: none;
Expand Down
2 changes: 1 addition & 1 deletion source/components/Input/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export default class Input extends React.Component {
}
}

componentWillReceiveProps(newProps) {
UNSAFE_componentWillReceiveProps(newProps) {
const id = newProps.id || generateId();

this.setState({
Expand Down
Loading