Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update eslint and stylelint dependencies #5098

Merged
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
Binary file added .yarn/offline-mirror/@types-minimist-1.2.0.tgz
Binary file not shown.
Binary file not shown.
Binary file added .yarn/offline-mirror/acorn-7.1.0.tgz
Binary file not shown.
Binary file removed .yarn/offline-mirror/acorn-jsx-5.0.1.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/acorn-jsx-5.1.0.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/ansi-escapes-4.3.0.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/array-includes-3.1.1.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/autoprefixer-9.7.4.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/camelcase-keys-6.1.1.tgz
Binary file not shown.
Binary file not shown.
Binary file added .yarn/offline-mirror/cli-cursor-3.1.0.tgz
Binary file not shown.
Binary file removed .yarn/offline-mirror/clone-regexp-1.0.1.tgz
Binary file not shown.
Binary file removed .yarn/offline-mirror/comment-parser-0.5.5.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/comment-parser-0.7.2.tgz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .yarn/offline-mirror/es-abstract-1.17.2.tgz
Binary file not shown.
Binary file removed .yarn/offline-mirror/eslint-6.0.1.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/eslint-6.8.0.tgz
Binary file not shown.
Binary file removed .yarn/offline-mirror/eslint-config-airbnb-17.1.1.tgz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/offline-mirror/eslint-module-utils-2.4.0.tgz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/offline-mirror/eslint-plugin-jsdoc-8.7.0.tgz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/offline-mirror/eslint-plugin-react-7.14.2.tgz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .yarn/offline-mirror/eslint-scope-5.0.0.tgz
Binary file not shown.
Binary file removed .yarn/offline-mirror/eslint-utils-1.3.1.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/eslint-utils-1.4.3.tgz
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/offline-mirror/espree-6.0.0.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/espree-6.1.2.tgz
Binary file not shown.
Binary file removed .yarn/offline-mirror/execall-1.0.0.tgz
Binary file not shown.
Binary file removed .yarn/offline-mirror/file-entry-cache-4.0.0.tgz
Binary file not shown.
Binary file removed .yarn/offline-mirror/flat-map-polyfill-0.3.8.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/globals-12.3.0.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/globby-11.0.0.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/hard-rejection-2.1.0.tgz
Binary file not shown.
Binary file removed .yarn/offline-mirror/html-tags-2.0.0.tgz
Binary file not shown.
Binary file removed .yarn/offline-mirror/html-tags-3.0.0.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/html-tags-3.1.0.tgz
Binary file not shown.
Binary file removed .yarn/offline-mirror/ignore-5.1.2.tgz
Binary file not shown.
Binary file removed .yarn/offline-mirror/import-lazy-3.1.0.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/inquirer-7.0.3.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/is-string-1.0.5.tgz
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/offline-mirror/jsdoctypeparser-4.0.0.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/jsdoctypeparser-6.1.0.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/jsx-ast-utils-2.2.3.tgz
Binary file not shown.
Binary file removed .yarn/offline-mirror/known-css-properties-0.11.0.tgz
Binary file not shown.
Binary file removed .yarn/offline-mirror/known-css-properties-0.14.0.tgz
Binary file not shown.
Binary file not shown.
Binary file added .yarn/offline-mirror/lodash.isboolean-3.0.3.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/lodash.isregexp-4.0.1.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/map-obj-4.1.0.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/meow-6.0.0.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/minimist-options-4.0.2.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/object.entries-1.1.1.tgz
Binary file not shown.
Binary file not shown.
Binary file added .yarn/offline-mirror/object.fromentries-2.0.2.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/object.values-1.1.1.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/optionator-0.8.3.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/postcss-7.0.26.tgz
Binary file not shown.
Binary file removed .yarn/offline-mirror/postcss-jsx-0.36.1.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/postcss-jsx-0.36.4.tgz
Binary file not shown.
Binary file removed .yarn/offline-mirror/postcss-sass-0.3.5.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/postcss-sass-0.4.2.tgz
Binary file not shown.
Binary file not shown.
Binary file added .yarn/offline-mirror/quick-lru-4.0.1.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/read-pkg-5.2.0.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/read-pkg-up-7.0.1.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/redent-3.0.0.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/regextras-0.7.0.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/restore-cursor-3.1.0.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/rxjs-6.5.4.tgz
Binary file not shown.
Binary file removed .yarn/offline-mirror/stylelint-10.1.0.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/stylelint-13.0.0.tgz
Binary file not shown.
Binary file removed .yarn/offline-mirror/stylelint-9.10.1.tgz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/offline-mirror/stylelint-prettier-1.1.1.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/stylelint-prettier-1.1.2.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/stylelint-scss-3.13.0.tgz
Binary file not shown.
Binary file removed .yarn/offline-mirror/stylelint-scss-3.9.0.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/table-5.4.6.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/trim-newlines-3.0.0.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/type-fest-0.6.0.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/type-fest-0.8.1.tgz
Binary file not shown.
Binary file not shown.
Binary file added .yarn/offline-mirror/v8-compile-cache-2.1.0.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/word-wrap-1.2.3.tgz
Binary file not shown.
Binary file added .yarn/offline-mirror/write-file-atomic-3.0.1.tgz
Binary file not shown.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"enzyme": "^3.10.0",
"enzyme-adapter-react-16": "^1.14.0",
"enzyme-to-json": "^3.3.5",
"eslint": "^6.0.0",
"eslint": "^6.8.0",
"eslint-config-carbon": "10.4.0",
"fs-extra": "^8.1.0",
"glob": "^7.1.4",
Expand All @@ -69,7 +69,7 @@
"react": "^16.8.6",
"react-dom": "^16.8.6",
"rimraf": "^3.0.0",
"stylelint": "^10.0.1"
"stylelint": "^13.0.0"
},
"husky": {
"hooks": {
Expand Down
8 changes: 7 additions & 1 deletion packages/components/src/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@ module.exports = {
plugins: ['jsdoc'],
rules: {
'jsdoc/check-param-names': 2,
'jsdoc/check-tag-names': 2,
'jsdoc/check-tag-names': [
'error',
{
definedTags: ['jest-environment'],
},
],
'jsdoc/check-types': 2,
'comma-dangle': [
2,
Expand All @@ -39,6 +44,7 @@ module.exports = {
2,
{ allowAfterThis: true, allowAfterSuper: true },
],
strict: ['error', 'global'],
},
settings: {
jsdoc: {
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/components/dropdown/dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ class Dropdown extends mixin(
* Enum for navigating backward/forward.
* @readonly
* @member Dropdown.NAVIGATE
* @type {Object}
* @type {object}
* @property {number} BACKWARD Navigating backward.
* @property {number} FORWARD Navigating forward.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import on from '../../globals/js/misc/on';

/**
* The structure for the position of floating menu.
* @typedef {Object} FloatingMenu~position
* @typedef {object} FloatingMenu~position
* @property {number} left The left position.
* @property {number} top The top position.
* @property {number} right The right position.
Expand All @@ -27,14 +27,14 @@ import on from '../../globals/js/misc/on';

/**
* The structure for the size of floating menu.
* @typedef {Object} FloatingMenu~size
* @typedef {object} FloatingMenu~size
* @property {number} width The width.
* @property {number} height The height.
*/

/**
* The structure for the position offset of floating menu.
* @typedef {Object} FloatingMenu~offset
* @typedef {object} FloatingMenu~offset
* @property {number} top The top position.
* @property {number} left The left position.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class InlineLoading extends mixin(

/**
* The list of states.
* @type {Object<string, string>}
* @type {object<string, string>}
*/
static states /* #__PURE_CLASS_PROPERTY__ */ = {
INACTIVE: 'inactive',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import on from '../../globals/js/misc/on';

/**
* The CSS property names of the arrow keyed by the floating menu direction.
* @type {Object<string, string>}
* @type {object<string, string>}
*/
const triggerButtonPositionProps = /* #__PURE__ */ (() => ({
[DIRECTION_TOP]: 'bottom',
Expand All @@ -34,7 +34,7 @@ const triggerButtonPositionProps = /* #__PURE__ */ (() => ({

/**
* Determines how the position of arrow should affect the floating menu position.
* @type {Object<string, number>}
* @type {object<string, number>}
*/
const triggerButtonPositionFactors = /* #__PURE__ */ (() => ({
[DIRECTION_TOP]: -2,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class ProgressIndicator extends mixin(createComponent, initComponentBySearch) {

/**
* The component state.
* @type {Object}
* @type {object}
*/
this.state = {
/**
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/components/tabs/tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ class Tab extends ContentSwitcher {
* Enum for navigating backward/forward.
* @readonly
* @member Tab.NAVIGATE
* @type {Object}
* @type {object}
* @property {number} BACKWARD Navigating backward.
* @property {number} FORWARD Navigating forward.
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/components/ui-shell/header-nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export default class HeaderNav extends mixin(
* Enum for navigating backward/forward.
* @readonly
* @member Header.NAVIGATE
* @type {Object}
* @type {object}
* @property {number} BACKWARD Navigating backward.
* @property {number} FORWARD Navigating forward.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ export default class HeaderSubmenu extends mixin(
* Enum for navigating backward/forward.
* @readonly
* @member HeaderSubmenu.NAVIGATE
* @type {Object}
* @type {object}
* @property {number} BACKWARD Navigating backward.
* @property {number} FORWARD Navigating forward.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ export default class NavigationMenu extends NavigationMenuPanel {
* Enum for navigating backward/forward.
* @readonly
* @member NavigationMenuPanel.NAVIGATE
* @type {Object}
* @type {object}
* @property {number} BACKWARD Navigating backward.
* @property {number} FORWARD Navigating forward.
*/
Expand Down
4 changes: 2 additions & 2 deletions packages/components/src/components/ui-shell/side-nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default class SideNav extends mixin(
* Enum for toggling side nav visibility
* @readonly
* @member SideNav.state
* @type {Object}
* @type {object}
* @property {string} EXPANDED Opening/visible
* @property {string} COLLAPSED Closing/hidden
*/
Expand Down Expand Up @@ -116,7 +116,7 @@ export default class SideNav extends mixin(
* If `options` is specified in the constructor, {@linkcode SideNav.create .create()}, or {@linkcode SideNav.init .init()},
* properties in this object are overriden for the instance being create and how {@linkcode SideNav.init .init()} works.
* @member SideNav.options
* @type {Object}
* @type {object}
* @property {string} selectorInit The data attribute to find side navs.
*/
static options /* #__PURE_CLASS_PROPERTY__ */ = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default function onFocusByKeyboard(node, name, callback) {
const focusoutEventName = hasFocusout ? 'focusout' : 'blur';
/**
* Event types supported by this function
* @type {Object<string, string>}
* @type {object<string, string>}
*/
const supportedEvents = {
focus: focusinEventName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export default function(ToMix) {

/**
* The component options.
* @type {Object}
* @type {object}
*/
this.options = Object.assign(
Object.create(this.constructor.options),
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/globals/js/mixins/evented-state.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export default function(ToMix) {
* Classes inheriting {@link EventedState `EventedState`} should override this function.
* @function EventedState#shouldStateBeChanged
* @param {string} [state] The new state. Can be an omitted, which means toggling.
* @param {Object} [detail]
* @param {object} [detail]
* The object that should be put to event details that is fired before/after changing state.
* Can have a `group` property, which specifies what state to be changed.
* @returns {boolean}
Expand Down
12 changes: 11 additions & 1 deletion packages/components/tests/spec/watch_spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
import { delay } from 'bluebird'; // For testing on browsers not supporting Promise
/**
* Copyright IBM Corp. 2018, 2018
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/

/* eslint-disable max-classes-per-file */

// For testing on browsers not supporting Promise
import { delay } from 'bluebird';
import settings from '../../src/globals/js/settings';
import mixin from '../../src/globals/js/misc/mixin';
import createComponent from '../../src/globals/js/mixins/create-component';
Expand Down
7 changes: 6 additions & 1 deletion packages/eslint-config-carbon/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,12 @@ module.exports = {
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'error',
'jsdoc/check-param-names': 2,
'jsdoc/check-tag-names': 2,
'jsdoc/check-tag-names': [
'error',
{
definedTags: ['jest-environment'],
},
],
'jsdoc/check-types': 2,
'jsx-a11y/no-static-element-interactions': 1,
'jsx-a11y/no-noninteractive-element-interactions': 1,
Expand Down
16 changes: 8 additions & 8 deletions packages/eslint-config-carbon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@
},
"dependencies": {
"babel-eslint": "^10.0.1",
"eslint-config-airbnb": "^17.0.0",
"eslint-config-airbnb-base": "^13.0.0",
"eslint-config-prettier": "^5.0.0",
"eslint-plugin-import": "^2.17.3",
"eslint-plugin-jsdoc": "^8.4.6",
"eslint-config-airbnb": "^18.0.1",
"eslint-config-airbnb-base": "^14.0.0",
"eslint-config-prettier": "^6.9.0",
"eslint-plugin-import": "^2.20.0",
"eslint-plugin-jsdoc": "^20.3.1",
"eslint-plugin-jsx-a11y": "^6.2.1",
"eslint-plugin-prettier": "^3.1.0",
"eslint-plugin-react": "^7.13.0",
"eslint-plugin-react-hooks": "^1.6.0",
"eslint-plugin-prettier": "^3.1.2",
"eslint-plugin-react": "^7.18.0",
"eslint-plugin-react-hooks": "^2.3.0",
"eslint-restricted-globals": "^0.2.0"
}
}
2 changes: 1 addition & 1 deletion packages/react/src/components/Icon/Icon.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import icons from 'carbon-icons';

/**
* The icons list object from `carbon-icons`.
* @type {Object}
* @type {object}
*/
let iconsList = icons;

Expand Down
4 changes: 2 additions & 2 deletions packages/react/src/components/OverflowMenu/OverflowMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const on = (element, ...args) => {

/**
* The CSS property names of the arrow keyed by the floating menu direction.
* @type {Object<string, string>}
* @type {object<string, string>}
*/
const triggerButtonPositionProps = {
[DIRECTION_TOP]: 'bottom',
Expand All @@ -43,7 +43,7 @@ const triggerButtonPositionProps = {

/**
* Determines how the position of arrow should affect the floating menu position.
* @type {Object<string, number>}
* @type {object<string, number>}
*/
const triggerButtonPositionFactors = {
[DIRECTION_TOP]: -2,
Expand Down
4 changes: 3 additions & 1 deletion packages/react/src/components/Tabs/Tabs-story.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
$css--font-face: false;
$css--body: false;
$css--reset: false;
@import '~carbon-components/src/globals/scss/css--helpers'; // SEE THE NOTE ABOVE

// SEE THE NOTE ABOVE
@import '~carbon-components/src/globals/scss/css--helpers';

.bx--tabs--container ~ div {
height: 320px;
Expand Down
6 changes: 3 additions & 3 deletions packages/react/src/internal/FloatingMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import window from 'window-or-global';

/**
* The structure for the position of floating menu.
* @typedef {Object} FloatingMenu~position
* @typedef {object} FloatingMenu~position
* @property {number} left The left position.
* @property {number} top The top position.
* @property {number} right The right position.
Expand All @@ -22,14 +22,14 @@ import window from 'window-or-global';

/**
* The structure for the size of floating menu.
* @typedef {Object} FloatingMenu~size
* @typedef {object} FloatingMenu~size
* @property {number} width The width.
* @property {number} height The height.
*/

/**
* The structure for the position offset of floating menu.
* @typedef {Object} FloatingMenu~offset
* @typedef {object} FloatingMenu~offset
* @property {number} top The top position.
* @property {number} left The left position.
*/
Expand Down
10 changes: 5 additions & 5 deletions packages/stylelint-config-elements/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
"access": "public"
},
"peerDependencies": {
"stylelint": "^9.10.1"
"stylelint": "^13.0.0"
},
"dependencies": {
"stylelint-config-prettier": "^4.0.0",
"stylelint-prettier": "^1.0.6",
"stylelint-scss": "^3.5.3"
"stylelint-config-prettier": "^8.0.1",
"stylelint-prettier": "^1.1.2",
"stylelint-scss": "^3.13.0"
},
"devDependencies": {
"stylelint": "^9.10.1"
"stylelint": "^13.0.0"
}
}
3 changes: 2 additions & 1 deletion packages/type/scss/_reset.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@
}

body {
font-family: $body-font-family;
@include carbon--font-weight('regular');

font-family: $body-font-family;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
Expand Down
Loading