A simple plugin for enforcing the use of the id attribute on styled components.
Install as a dev dependency:
yarn add -D eslint-plugin-styled-component-jsx-attributes
or
npm i --save-dev eslint-plugin-styled-component-jsx-attributes
Add styled-component-jsx-attributes to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:
{
"plugins": ["styled-component-jsx-attributes"]
}