eslint-plugin-scm

1.0.1 • Public • Published

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:

  1. Installation process
  2. Software dependencies
  3. Latest releases
  4. 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

  1. Run npm init @eslint/config@latest Getting Started and follow the steps.
  2. Inside eslint.config.mjs add the following code.

💻

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;

Package Sidebar

Install

npm i eslint-plugin-scm

Weekly Downloads

0

Version

1.0.1

License

ISC

Unpacked Size

7.92 kB

Total Files

7

Last publish

Collaborators

  • kledom01