UNPKG

@atlaskit/eslint-plugin-ui-styling-standard

Version:

The eslint plugin to enforce and educate on Atlassian's UI Styling Standard

55 lines (53 loc) • 1.68 kB
/** * THIS FILE WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen} * @codegen <<SignedSource::ef33ad38180e99be70285ddb225c56b9>> * @codegenCommand afm workspace @atlaskit/eslint-plugin-ui-styling-standard codegen */ import allFlat from './presets/all-flat.codegen'; import all from './presets/all.codegen'; import recommendedFlat from './presets/recommended-flat.codegen'; import recommended from './presets/recommended.codegen'; import { rules } from './rules/index.codegen'; // this uses require because not all node versions this package supports use the same import assertions/attributes // eslint-disable-next-line import/no-extraneous-dependencies const pkgJson = require('@atlaskit/eslint-plugin-ui-styling-standard/package.json'); const { version, name } = pkgJson; export const plugin = { meta: { name, version }, rules, // flat configs need to be done like this so they can get a reference to the plugin. // see here: https://eslint.org/docs/latest/extend/plugins#configs-in-plugins // they cannot use `Object.assign` because it will not work with the getter configs: { all, 'flat/all': { ...allFlat, plugins: { ...allFlat.plugins, get '@atlaskit/ui-styling-standard'() { return plugin; } } }, recommended, 'flat/recommended': { ...recommendedFlat, plugins: { ...recommendedFlat.plugins, get '@atlaskit/ui-styling-standard'() { return plugin; } } } } }; export { rules } from './rules/index.codegen'; export const configs = plugin.configs; export const meta = plugin.meta; export default plugin;