diff --git a/.codeclimate.yml b/.codeclimate.yml index 47e3e6ab9d..21e6b33bf0 100644 --- a/.codeclimate.yml +++ b/.codeclimate.yml @@ -27,6 +27,7 @@ plugins: enabled: true eslint: enabled: true + channel: eslint-4 rubocop: enabled: true scss-lint: diff --git a/.eslintrc.yml b/.eslintrc.yml index b1b38351cd..b71e564e2a 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -17,11 +17,9 @@ plugins: parserOptions: sourceType: module ecmaFeatures: - arrowFunctions: true + experimentalObjectRestSpread: true jsx: true - destructuring: true - modules: true - spread: true + ecmaVersion: 2018 settings: import/extensions: @@ -114,6 +112,7 @@ rules: react/self-closing-comp: error jsx-a11y/accessible-emoji: warn + jsx-a11y/alt-text: warn jsx-a11y/anchor-has-content: warn jsx-a11y/aria-activedescendant-has-tabindex: warn jsx-a11y/aria-props: warn @@ -124,16 +123,22 @@ rules: jsx-a11y/href-no-hash: warn jsx-a11y/html-has-lang: warn jsx-a11y/iframe-has-title: warn - jsx-a11y/img-has-alt: warn jsx-a11y/img-redundant-alt: warn + jsx-a11y/interactive-supports-focus: warn jsx-a11y/label-has-for: off jsx-a11y/mouse-events-have-key-events: warn jsx-a11y/no-access-key: warn jsx-a11y/no-distracting-elements: warn + jsx-a11y/no-noninteractive-element-interactions: + - warn + - handlers: + - onClick jsx-a11y/no-onchange: warn jsx-a11y/no-redundant-roles: warn - jsx-a11y/onclick-has-focus: warn - jsx-a11y/onclick-has-role: warn + jsx-a11y/no-static-element-interactions: + - warn + - handlers: + - onClick jsx-a11y/role-has-required-aria-props: warn jsx-a11y/role-supports-aria-props: off jsx-a11y/scope: warn diff --git a/.travis.yml b/.travis.yml index 777ca581cb..59d495c433 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,6 +9,9 @@ cache: - tmp/cache/babel-loader dist: trusty sudo: required +branches: + only: + - master notifications: email: false diff --git a/app/controllers/shares_controller.rb b/app/controllers/shares_controller.rb index 9c738fc4f1..3cbaccb352 100644 --- a/app/controllers/shares_controller.rb +++ b/app/controllers/shares_controller.rb @@ -15,13 +15,14 @@ class SharesController < ApplicationController private def initial_state_params + text = [params[:title], params[:text], params[:url]].compact.join(' ') { settings: Web::Setting.find_by(user: current_user)&.data || {}, push_subscription: current_account.user.web_push_subscription(current_session), current_account: current_account, token: current_session.token, admin: Account.find_local(Setting.site_contact_username), - text: params[:text], + text: text, } end diff --git a/app/javascript/images/icon_cached.svg b/app/javascript/images/icon_cached.svg new file mode 100644 index 0000000000..1087c43503 --- /dev/null +++ b/app/javascript/images/icon_cached.svg @@ -0,0 +1,2 @@ + + diff --git a/app/javascript/images/icon_grade.svg b/app/javascript/images/icon_grade.svg new file mode 100644 index 0000000000..f48b468899 --- /dev/null +++ b/app/javascript/images/icon_grade.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/app/javascript/images/icon_person_add.svg b/app/javascript/images/icon_person_add.svg new file mode 100644 index 0000000000..068b8ae7cc --- /dev/null +++ b/app/javascript/images/icon_person_add.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/app/javascript/images/icon_reply.svg b/app/javascript/images/icon_reply.svg new file mode 100644 index 0000000000..cf6a09abc6 --- /dev/null +++ b/app/javascript/images/icon_reply.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/app/javascript/mastodon/components/attachment_list.js b/app/javascript/mastodon/components/attachment_list.js index b3d00b3357..9f2d46ddd7 100644 --- a/app/javascript/mastodon/components/attachment_list.js +++ b/app/javascript/mastodon/components/attachment_list.js @@ -20,11 +20,11 @@ export default class AttachmentList extends ImmutablePureComponent { ); diff --git a/app/javascript/mastodon/components/collapsable.js b/app/javascript/mastodon/components/collapsable.js index 42ea37ec22..d5d4311864 100644 --- a/app/javascript/mastodon/components/collapsable.js +++ b/app/javascript/mastodon/components/collapsable.js @@ -5,11 +5,11 @@ import PropTypes from 'prop-types'; const Collapsable = ({ fullHeight, isVisible, children }) => ( - {({ opacity, height }) => + {({ opacity, height }) => (
{children}
- } + )}
); diff --git a/app/javascript/mastodon/components/icon_button.js b/app/javascript/mastodon/components/icon_button.js index 06f53841d2..b96e48fd09 100644 --- a/app/javascript/mastodon/components/icon_button.js +++ b/app/javascript/mastodon/components/icon_button.js @@ -93,7 +93,7 @@ export default class IconButton extends React.PureComponent { return ( - {({ rotate }) => + {({ rotate }) => (