Atlaskit - ESLint plugin configuration issues in React 16.8.0

Hi, has anyone faced this problem while configuring the .eslintrc.js file?

Definition for rule ‘@atlaskit/design-system/no-deprecated-api-usage’ was not found @atlaskit/design-system/no-deprecated-api-usage

I followed these instructions:
https://atlassian.design/components/eslint-plugin-design-system/usage

.eslintrc.js

module.exports = {
  plugins: ['@atlaskit/design-system'],
  extends: ['plugin:@atlaskit/design-system/recommended'],
  rules: {
    '@atlaskit/design-system/ensure-design-token-usage': [
      'error',
      { shouldEnsureFallbackUsage: true }
    ],
    '@atlaskit/design-system/no-deprecated-design-token-usage': 'warn',
    '@atlaskit/design-system/no-unsafe-design-token-usage': [
      'error',
      { shouldEnsureFallbackUsage: true }
    ],
    '@atlaskit/design-system/use-visually-hidden': 'error',
    '@atlaskit/design-system/no-deprecated-imports': 'error',
    '@atlaskit/design-system/no-deprecated-api-usage': 'error'
  }
};

package.json

"dependencies": {
    "@atlaskit/button": "^16.3.9",
    "@atlaskit/css-reset": "^6.3.15",
    "@types/node": "^16.7.13",
    "@types/react": "^16.9.56",
    "@types/react-dom": "^16.9.9",
    "react": "^16.8.0",
    "react-dom": "^16.8.0",
    "react-scripts": "4.0.3",
    "styled-components": "^3.2",
    "typescript": "^4.4.2"
  },

"devDependencies": {
    "@atlaskit/eslint-plugin-design-system": "^4.11.2"
  }

I didn’t find any useful information related to that error :frowning_face:

Thank you in advance!

Hi there -

Yeah this is a typo in the docs merging two different rules together :sweat:

The readme should have the following change:

- '@atlaskit/design-system/no-deprecated-api-usage': 'error'
+ '@atlaskit/design-system/no-deprecated-apis': 'error'

Sorry about that we’ll need to lodge a fix!

2 Likes

Hi,

I made that small change and it seems the issues are gone

Thank you :smiley:

2 Likes