Configuring eslint

Basic configuration

The configuration for eslint can be added to the SERVER.txt to apply for all projects, or to PROJECTS.txt to enable project-specific settings. If the properties are declared in the SERVER file and also in the PROJECT file, the project-specific properties will override the global properties.

Syntax

'TOOLS' => {
  'eslint' => {
    'CFGFILE' => {
      'JAVASCRIPT' => 'eslint cfg file',
      'TYPESCRIPT' => 'eslint-typescript cfg file'
    },
  }
}

eslint needs configuration about which environments and global variables are used. The default configuration can be found in the eslint.config file in the TICS configuration directory. The rule configuration is generated using the RULES.txt and IMPL.txt and appended to the eslint configuration in the TICS configuration directory.

It is possible to configure an alternative eslint configuration file in the SERVER.txt/PROJECTS.txt using the CFGFILEfollowing configuration property.

Example

'TOOLS' => {
  'eslint' => {
    'CFGFILE' => {
      'JAVASCRIPT' => '/path/to/eslint.config',
      'TYPESCRIPT' => '/path/to/eslint-typescript.config'
    },
  }
}