🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

eslint-config-particle

Package Overview
Dependencies
Maintainers
3
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-config-particle

eslint config rules for Particle projects

latest
Source
npmnpm
Version
3.0.3
Version published
Weekly downloads
1K
74.07%
Maintainers
3
Weekly downloads
 
Created
Source

eslint-config-particle

eslint config rules for Particle Javascript projects

Adding/updating rules

You can do so in the index.mjs file. There are separate functions for test rules, TS rules, js rules, etc.

If you want to validate your rule is working as expected, see the test repo's README

Enforcing style rules in a Particle project

Install dependencies

npm install -D eslint eslint-config-particle

Create a config

JS Example

// eslint.config.mjs
import { particle } from 'eslint-config-particle';

export default particle({
	rootDir: import.meta.dirname,
	testGlobals: 'mocha'
});

TS Example

// eslint.config.mjs
import { particle } from 'eslint-config-particle';

export default particle({
	rootDir: import.meta.dirname,
	testGlobals: 'vitest',
	globalIgnores: ['./update-changelog.js', './esbuild.js', '**/scripts/**'],
	typescript: {
		tsconfig: './tsconfig-check.json'
	},
	overrides: {
		// When we switch to a real logger, we can turn this off
		'no-console': 'off',
		// Dbus APIs are usually cap functions
		'new-cap': 'off'
	}
});

Customizing beyond particle opts

// eslint.config.mjs
import { particle } from 'eslint-config-particle';

export default [
    ...particle({
	    rootDir: import.meta.dirname,
	    // more particle opts
    }),
	{
		// my custom rules here that the particle fn doesn't let me customize 
    }
];

Add lint scripts to package.json and update CI

  "scripts": {
    "lint": "eslint",
    "lint:fix": "eslint --fix",
  }

Keywords

eslint

FAQs

Package last updated on 21 Oct 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts