eslint-plugin-scm
v1.0.1
Published
ESLint plugin for the harro rules.
Downloads
2
Maintainers
Readme
Introduction
TODO: Give a short introduction of your project. Let this section explain the objectives or the motivation behind this project.
Getting Started
TODO: Guide users through getting your code up and running on their own system. In this section you can talk about:
- Installation process
- Software dependencies
- Latest releases
- API references
Build and Test
TODO: Describe and show how to build your code and run the tests.
Contribute
TODO: Explain how other users and developers can contribute to make your code better.
If you want to learn more about creating good readme files then refer the following guidelines. You can also seek inspiration from the below readme files:
Adjustments for JQuery
If you want to run ESLint on JQuery Projects add the following env
Object inside the index.js
.
const plugin = {
meta: {
...
},
env: {
browser: true,
jquery: true
},
configs: {
...
},
rules: {
...
},
};
module.exports = plugin;
Implementation inside a project
- Run
npm init @eslint/config@latest
Getting Started and follow the steps. - Inside
eslint.config.mjs
add the following code.
:computer:
import pluginReactConfig from "eslint-plugin-react/configs/recommended.js";
import plugin from "eslint-plugin-testconfig";
const eslintConfig = [
{
files: ["**/*.js"],
languageOptions: {
sourceType: "module",
ecmaVersion: "latest",
},
// Using the eslint-plugin-example plugin defined locally
plugins: { example: plugin },
rules: {
"example/enforce-foo-bar": "error",
},
},
plugin.configs.recommended,
{
languageOptions: {
sourceType: "module",
ecmaVersion: "latest",
},
},
pluginReactConfig,
{
languageOptions: {
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
sourceType: "module",
ecmaVersion: "latest",
},
},
];
export default eslintConfig;