Numerous Panicky Mimes

    eslint-config-sznm

    1.0.0 • Public • Published

    eslint-config-sznm

    ESLint rules I use throughout my personal projects with bundled dependencies.

    Before Installation

    ⚠️ [WIP] still tinkering with the configurations, will be frequently changed / updated in the meantime. Some things might fall down / not work properly. Use at your own risk. I made this config with support for Next.js / React + TypeScript as first priority in mind. There might be some rules that you need to disable if your project is a mixed JS/TS or JS only codebase.

    🔧 Installation

    npm i --save-dev eslint eslint-config-sznm
    
    # or (if using yarn)
    
    yarn add -D eslint eslint-config-sznm

    💻 Usage

    add the extends to your project's eslintrc config (.eslintrc.js or other extensions whichever you use in your project)

    Next.js Projects

    make sure eslint-config-next is installed (as devDependencies)

    /** @type {import('eslint').Linter.Config} */
    module.exports = {
      extends: ['sznm/react', 'plugin:@next/next/recommended'],
    };

    optional:

    /** @type {import('eslint').Linter.Config} */
    module.exports = {
      extends: [
        'sznm/react',
        'plugin:react/jsx-runtime', // to switch off jsx (import React) warning
        'plugin:@next/next/recommended',
      ],
    };

    ⚛️ React Projects

    /** @type {import('eslint').Linter.Config} */
    module.exports = {
      extends: ['sznm/react'],
    };

    🟨 Non React Projects

    ⚠️ [WIP] still tinkering around here, I made this config with support for Next.js and React + TypeScript as first priority in mind.

    /** @type {import('eslint').Linter.Config} */
    module.exports = {
      extends: ['sznm'],
    };

    🐣 Rules

    eslint-config-sznm extends from and uses these configurations & plugins:

    • eslint-config-airbnb: airbnb's javascript styleguide
    • eslint-config-prettier: to turns off all rules that are unnecessary or might conflict with Prettier.
    • eslint-plugin-prettier: runs Prettier as an ESLint rule and reports differences as individual ESLint issues.
    • eslint-plugin-sonarjs: SonarJS rules for ESLint to detect bugs and suspicious patterns in your code.

    📣 Suggestions

    feel free to give feedbacks or suggestions or start a discussion in Github discussions of the repo.

    Install

    npm i eslint-config-sznm

    DownloadsWeekly Downloads

    946

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    14.7 kB

    Total Files

    22

    Last publish

    Collaborators

    • sozonome