18.0.1 • Published 3 days ago

@guardian/eslint-plugin-source-foundations v18.0.1

Weekly downloads
-
License
-
Repository
-
Last release
3 days ago

@guardian/eslint-plugin-source-foundations

ESLint plugin for Guardian projects using the @guardian/source-foundations package.

This package is part of the Source design system.

Installation

yarn add -D @guardian/eslint-plugin-source-foundations

or

npm install --save-dev @guardian/eslint-plugin-source-foundations

Usage

// ESLint configuration file
{
    "extends": "plugin:@guardian/source-foundations/recommended"
}

Rules

Valid import path

This rules errors for imports from @guardian/src-foundations or any sub module. If possible, it will autofix the import to the new location.

Some breaking changes can not be autofixed, for example, in cases where the export has been removed from Source. Developers must manually provide an alternative.

No * imports or exports

This rule errors for import or export * statements from any src-* or source-* package as this pattern is not recommended.

No duplicate imports

This rule, from eslint-plugin-import, errors when multiple import statements import from the same pacakge. These issues can be autofixed. This rule is included as, due to the remove of sub modules and the consolidation of component packages, many import statements are fixed by the valid-import-path rule to import from the same location in v4.

Known Issues

  • New theme names not always updated automatically

    The theme variables have changed both name and location in the v4. The plugin should automatically update both but sometimes this does not work.

18.0.1

3 days ago

18.0.0

3 months ago

17.0.2

3 months ago

17.0.1

4 months ago

17.0.0

5 months ago

16.0.1

5 months ago

16.0.0

5 months ago

15.0.0

9 months ago

14.0.0

9 months ago

13.0.0

11 months ago

12.0.0

1 year ago

9.0.3

1 year ago

10.0.0

1 year ago

11.0.0

1 year ago

8.0.4

1 year ago

8.0.1

1 year ago

8.0.3

1 year ago

8.0.2

1 year ago

9.0.2

1 year ago

9.0.1

1 year ago

9.0.0

1 year ago

8.0.0

2 years ago

6.0.1

2 years ago

7.0.0

2 years ago

6.0.0

2 years ago

5.0.1

2 years ago

5.0.0

2 years ago

4.0.1

2 years ago

4.0.0-rc.5

2 years ago

4.0.0

2 years ago

4.0.0-rc.4

2 years ago

4.0.2

2 years ago

4.0.0-rc.6

2 years ago

4.0.0-rc.3

2 years ago

4.0.0-rc.2

3 years ago

4.0.0-rc.1

3 years ago

4.0.0-rc.0

3 years ago

4.0.0-alpha.3

3 years ago