Skip to content

An common eslint-config to be shared between the different js/ts rotki repositories

License

Notifications You must be signed in to change notification settings

rotki/eslint-config

Repository files navigation

@rotki/eslint-config

npm (scoped)

Inspired by @antfu/eslint-config and @sxzz/eslint-config.

A common configuration to be used across the different rotki TypeScript and JavaScript repositories.

Usage

Install

pnpm i -D eslint @rotki/eslint-config

Config eslint.config.mjs

import rotki from '@rotki/eslint-config';

// eslint-disable-next-line import/no-default-export
export default rotki();

Add script for package.json

For example:

{
  "scripts": {
    "lint": "eslint .",
    "lint:fix": "eslint . --fix"
  }
}

@intlify/eslint-plugin-vue-i18n

// eslint.config.mjs
import rotki from '@rotki/eslint-config';

// eslint-disable-next-line import/no-default-export
export default rotki({
  vueI18n: {
    src: path.join('app', 'src'), // defaults to src for @intlify/vue-i18n/no-unused-keys,
    localeDir: 'locales', // that would be under app/src/
    ignores: [], // for @intlify/vue-i18n/no-unused-keys
  },
});

TypeScript Aware Rules

// eslint.config.mjs
import rotki from '@rotki/eslint-config';

// eslint-disable-next-line import/no-default-export
export default rotki({
  typescript: {
    tsconfigPath: 'tsconfig.json',
  },
});

License

AGPL-3.0 License © 2023- Rotki Solutions GmbH

About

An common eslint-config to be shared between the different js/ts rotki repositories

Resources

License

Stars

Watchers

Forks

Packages

No packages published