Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including eslint-config-yceffort with all npm packages installed. Try it out:

var eslintConfigYceffort = require("eslint-config-yceffort")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

eslint-config-yceffort v0.0.5

eslint config by yceffort

Usage

eslint

package.json

{
  "lint": "eslint '**/*.{js,ts,tsx}'",
  "lint:fix": "npm run lint -- --fix"
}

.eslintrc

{
  "extends": "eslint-config-yceffort",
  "rules": {
    // your custom rules..
  }
}

.eslintrc in typescript package

// .eslintrc 파일
{
  "extends": [
    "eslint-config-yceffort/typescript",
    ...
  ],
  "rules": {
    // your custom rules
  }
}

if you want to ignore certain words from @typescript-eslint/naming-convention, please add these files in your project.

naming-convention.js

// Edit your custom Exclude words
const excludeWords = [
  "redirect_uris",
  "client_id",
  "client_secret",
  "access_type",
];
const regex = `${excludeWords.join("|")})RunKit;

const defaultRule = require("eslint-config-yceffort/rules/typescript");

const extendedRules = defaultRule.rules[
  "@typescript-eslint/naming-convention"
].map((item) =>
  typeof item === "string"
    ? item
    : {
        ...item,
        filter: {
          regex: `${item.filter.regex.split(")quot;)[0]}|${regex}`,
          match: false,
        },
      }
);

module.exports = {
  extendedRules,
};

eslintrc.js

const customRule = require('./naming-convention')

module.exports = {
  "extends": [
    "eslint-config-yceffort/typescript",
  ],
  "rules": {
    '@typescript-eslint/naming-convention': customRule.extendedRules
  }
}

prettier

{
  "prettier": "prettier '**/*.{json,yaml,md}' --check",
  "prettier:fix": "prettier '**/*.{json,yaml,md}' --write"
}

.prettierrc

"eslint-config-yceffort/prettierrc"
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free