Class Eslint

  • All Implemented Interfaces:
    software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct, software.constructs.IDependable

    @Generated(value="jsii-pacmak/1.96.0 (build 921e240)",
               date="2024-03-28T21:16:43.162Z")
    @Stability(Experimental)
    public class Eslint
    extends Component
    (experimental) Represents eslint configuration.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Eslint.Builder
      (experimental) A fluent builder for Eslint.
      • Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

        software.amazon.jsii.JsiiObject.InitializationMode
      • Nested classes/interfaces inherited from interface software.constructs.IConstruct

        software.constructs.IConstruct.Jsii$Default, software.constructs.IConstruct.Jsii$Proxy
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
        Eslint​(NodeProject project, EslintOptions options)  
      protected Eslint​(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)  
      protected Eslint​(software.amazon.jsii.JsiiObjectRef objRef)  
    • Constructor Detail

      • Eslint

        protected Eslint​(software.amazon.jsii.JsiiObjectRef objRef)
      • Eslint

        protected Eslint​(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
      • Eslint

        @Stability(Experimental)
        public Eslint​(@NotNull
                      NodeProject project,
                      @NotNull
                      EslintOptions options)
        Parameters:
        project - This parameter is required.
        options - This parameter is required.
    • Method Detail

      • of

        @Stability(Experimental)
        @Nullable
        public static Eslint of​(@NotNull
                                Project project)
        (experimental) Returns the singletone Eslint component of a project or undefined if there is none.

        Parameters:
        project - This parameter is required.
      • addExtends

        @Stability(Experimental)
        public void addExtends​(@NotNull
                               @NotNull String... extendList)
        (experimental) Adds an extends item to the eslint configuration.

        Parameters:
        extendList - The list of "extends" to add. This parameter is required.
      • addIgnorePattern

        @Stability(Experimental)
        public void addIgnorePattern​(@NotNull
                                     String pattern)
        (experimental) Do not lint these files.

        Parameters:
        pattern - This parameter is required.
      • addLintPattern

        @Stability(Experimental)
        public void addLintPattern​(@NotNull
                                   String pattern)
        (experimental) Add a file, glob pattern or directory with source files to lint (e.g. [ "src" ]).

        Parameters:
        pattern - This parameter is required.
      • addOverride

        @Stability(Experimental)
        public void addOverride​(@NotNull
                                EslintOverride override)
        (experimental) Add an eslint override.

        Parameters:
        override - This parameter is required.
      • addPlugins

        @Stability(Experimental)
        public void addPlugins​(@NotNull
                               @NotNull String... plugins)
        (experimental) Adds an eslint plugin.

        Parameters:
        plugins - The names of plugins to add. This parameter is required.
      • addRules

        @Stability(Experimental)
        public void addRules​(@NotNull
                             Map<String,​Object> rules)
        (experimental) Add an eslint rule.

        Parameters:
        rules - This parameter is required.
      • allowDevDeps

        @Stability(Experimental)
        public void allowDevDeps​(@NotNull
                                 String pattern)
        (experimental) Add a glob file pattern which allows importing dev dependencies.

        Parameters:
        pattern - glob pattern. This parameter is required.
      • getConfig

        @Stability(Experimental)
        @NotNull
        public Object getConfig()
        (experimental) Direct access to the eslint configuration (escape hatch).
      • getEslintTask

        @Stability(Experimental)
        @NotNull
        public Task getEslintTask()
        (experimental) eslint task.
      • getIgnorePatterns

        @Stability(Experimental)
        @NotNull
        public List<String> getIgnorePatterns()
        (experimental) File patterns that should not be linted.
      • getLintPatterns

        @Stability(Experimental)
        @NotNull
        public List<String> getLintPatterns()
        (experimental) Returns an immutable copy of the lintPatterns being used by this eslint configuration.
      • getOverrides

        @Stability(Experimental)
        @NotNull
        public List<EslintOverride> getOverrides()
        (experimental) eslint overrides.
      • getRules

        @Stability(Experimental)
        @NotNull
        public Map<String,​List<Object>> getRules()
        (experimental) eslint rules.