5.0.3 • Published 23 hours ago

eslint-config-reverentgeek v5.0.3

Weekly downloads
26
License
MIT
Repository
github
Last release
23 hours ago

eslint-config-reverentgeek

This package is ReverentGeek's preferred configuration settings for eslint.

Usage (eslint >= v9.0)

  1. Install dependencies.
npm install --save-dev eslint eslint-config-reverentgeek
  1. Create an eslint.config.js file.
  2. Add the following to the config file.
"use strict";

const rgConfig = require( "eslint-config-reverentgeek" );
module.exports = [
	...rgConfig.configs.common,
	{
		rules: {
		}
	}
];

Alternative Configs

The blog config changes the code style to two-spaced indentions, which is better for copying code samples to blog posts.

"use strict";

const rgConfig = require( "eslint-config-reverentgeek" );
module.exports = [
	...rgConfig.configs.browser,
	...rgConfig.configs.blog,
	{
		rules: {
		}
	}
];

The node config adds specific support for Node.js and CommonJS modules.

"use strict";

const rgConfig = require( "eslint-config-reverentgeek" );
module.exports = [
	...rgConfig.configs.node,
	{
		rules: {
			"n/no-unpublished-require": [ "error", {
				allowModules: [ "eslint-config-reverentgeek" ]
			} ]
		}
	}
];

The node-exm config adds specific support for Node.js and ES modules (import/export).

"use strict";

const rgConfig = require( "eslint-config-reverentgeek" );
module.exports = [
	...rgConfig.configs[ "node-esm" ],
	{
		rules: {
			"n/no-extraneous-require": [ "error", {
				allowModules: [ "eslint-config-reverentgeek" ]
			} ]
		}
	}
];

The browser config sets the browser environment and adds ES module support.

"use strict";

const rgConfig = require( "eslint-config-reverentgeek" );
module.exports = [
	...rgConfig.configs.browser,
	{
		rules: {
		}
	}
];

Legacy .eslintrc.js support (eslint < v9.0)

  1. Install dependencies.
npm install --save-dev eslint@8 eslint-config-reverentgeek@4
  1. Create an .eslintrc.js file.
  2. Add the following to the config file.
module.exports = {
	extends: [ "reverentgeek" ]
};

Alternative Rule Sets

The blog rule set changes to code style to two-spaced indentions, which is better for copying code samples to blog posts.

module.exports = {
	extends: [ "reverentgeek/blog" ]
};

The node rule set adds specific support for Node.js and CommonJS modules.

"use strict";

module.exports = {
	extends: [ "reverentgeek/node" ]
};

The node/module rule set adds specific support for Node.js and ES modules (import/export).

"use strict";

module.exports = {
	extends: [ "reverentgeek/node/module" ]
};

The browser rule set the browser environment and adds ES module support.

module.exports = {
	extends: [ "reverentgeek/browser" ]
};
5.0.3

23 hours ago

5.0.2

24 hours ago

5.0.1

24 hours ago

5.0.0

2 days ago

4.0.2

9 months ago

4.0.1

10 months ago

4.0.0

11 months ago

3.2.2

2 years ago

3.2.1

2 years ago

3.2.0

2 years ago

3.1.2

3 years ago

3.1.1

4 years ago

3.1.0

4 years ago

3.0.0

4 years ago

2.2.0

4 years ago

2.1.2

4 years ago

2.1.1

4 years ago

2.1.0

4 years ago

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago