1.0.1 • Published 6 months ago

eslint-plugin-no-const-array v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
6 months ago

No Const Array plugin

What's doing those plugin?

Restricts using arrays which will be declared as constant

Usage

module.exports = {
	'env': {
		'browser': true,
		'es2021': true
	},
	'extends': [
		'eslint:recommended',
		'plugin:@typescript-eslint/recommended'
	],
	'overrides': [
		{
			plugins: ['no-const-array'],
			rules: {
				'no-const-array/no-const-array': 'error'
			},
			'env': {
				'node': true
			},
			'files': [
				'.eslintrc.{js,cjs}'
			],
			'parserOptions': {
				'sourceType': 'script'
			}
		}
	],
	'parser': '@typescript-eslint/parser',
	'parserOptions': {
		'ecmaVersion': 'latest',
		'sourceType': 'module'
	},
	'plugins': [
		'@typescript-eslint',
		'no-const-array'
	],
	'rules': {
		'indent': [
			'error',
			'tab'
		],
		'linebreak-style': [
			'error',
			'unix'
		],
		'quotes': [
			'error',
			'single'
		],
		'semi': [
			'error',
			'always'
		],
		'no-const-array/no-const-array': 'error' // rule
	}
};

This rule writed only for fun, but if you want to make update, open repository link

1.0.1

6 months ago

1.0.0

6 months ago