{"id":19646180,"url":"https://github.com/yoctol/eslint-config-yoctol-base","last_synced_at":"2025-04-28T15:30:30.986Z","repository":{"id":8379445,"uuid":"58181503","full_name":"Yoctol/eslint-config-yoctol-base","owner":"Yoctol","description":"Yoctol specific base linting rules for ESLint","archived":false,"fork":false,"pushed_at":"2025-04-21T18:42:52.000Z","size":352,"stargazers_count":2,"open_issues_count":11,"forks_count":1,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-04-21T19:44:28.422Z","etag":null,"topics":["eslint","eslint-config"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Yoctol.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2016-05-06T04:43:08.000Z","updated_at":"2021-09-17T04:57:18.000Z","dependencies_parsed_at":"2023-11-18T00:01:44.096Z","dependency_job_id":"a6e372dd-10a7-441f-8cee-214e8fed389c","html_url":"https://github.com/Yoctol/eslint-config-yoctol-base","commit_stats":null,"previous_names":[],"tags_count":44,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yoctol%2Feslint-config-yoctol-base","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yoctol%2Feslint-config-yoctol-base/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yoctol%2Feslint-config-yoctol-base/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Yoctol%2Feslint-config-yoctol-base/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Yoctol","download_url":"https://codeload.github.com/Yoctol/eslint-config-yoctol-base/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251338504,"owners_count":21573570,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["eslint","eslint-config"],"created_at":"2024-11-11T14:37:11.939Z","updated_at":"2025-04-28T15:30:30.713Z","avatar_url":"https://github.com/Yoctol.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# eslint-config-yoctol-base\n\n[![NPM version][npm-image]][npm-url]\n[![Build Status][travis-image]][travis-url]\n[![Greenkeeper badge](https://badges.greenkeeper.io/Yoctol/eslint-config-yoctol-base.svg)](https://greenkeeper.io/)\n[![Dependency Status][david_img]][david_site]\n\n\u003e Yoctol Info. base ESLint config, fork from [eslint-config-airbnb-base](https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb-base).\n\n## Usage\n\nWe export two ESLint configurations for your usage.\n\n### eslint-config-yoctol-base\n\nOur default export contains all of our ESLint rules, including ECMAScript 6+. It requires `eslint`, `eslint-plugin-import`, `eslint-plugin-prettier`, `eslint-plugin-sort-imports-es6-autofix` and `prettier`.\n\n1. Install the correct versions of each package, which are listed by the command:\n\n```sh\nnpm info \"eslint-config-yoctol-base@latest\" peerDependencies\n```\n\nLinux/OSX users can simply run\n\n```sh\n(\n  export PKG=eslint-config-yoctol-base;\n  npm info \"$PKG@latest\" peerDependencies --json | command sed 's/[\\{\\},]//g ; s/: /@/g' | xargs npm install --save-dev \"$PKG@latest\"\n)\n```\n\nWhich produces and runs a command like:\n\n```sh\n  npm install --save-dev eslint-config-yoctol-base eslint@^#.#.# eslint-plugin-import@^#.#.# eslint-plugin-prettier@^#.#.# eslint-plugin-sort-imports-es6-autofix@^#.#.#\n```\n\nWindows users can either install all the peer dependencies manually, or use the [install-peerdeps](https://github.com/nathanhleung/install-peerdeps) cli tool.\n\n```sh\nnpm install -g install-peerdeps\ninstall-peerdeps --dev eslint-config-yoctol-base\n```\n\nThe cli will produce and run a command like:\n\n```sh\nnpm install --save-dev eslint-config-yoctol-base eslint@^#.#.# eslint-plugin-import@^#.#.# eslint-plugin-prettier@^#.#.# eslint-plugin-sort-imports-es6-autofix@^#.#.#\n```\n\n2. Add `\"extends\": \"yoctol-base\"` to your .eslintrc\n\n### eslint-config-yoctol-base/legacy\n\nLints ES5 and below. Requires `eslint` and `eslint-plugin-import`.\n\n1. Install the correct versions of each package, which are listed by the command:\n\n```sh\nnpm info \"eslint-config-yoctol-base@latest\" peerDependencies\n```\n\nLinux/OSX users can simply run\n\n```sh\n(\n  export PKG=eslint-config-yoctol-base;\n  npm info \"$PKG\" peerDependencies --json | command sed 's/[\\{\\},]//g ; s/: /@/g' | xargs npm install --save-dev \"$PKG\"\n)\n```\n\nWhich produces and runs a command like:\n\n```sh\nnpm install --save-dev eslint-config-yoctol-base eslint@^#.#.# eslint-plugin-import@^#.#.# eslint-plugin-prettier@^#.#.# eslint-plugin-sort-imports-es6-autofix@^#.#.#\n```\n\n2. Add `\"extends\": \"yoctol-base/legacy\"` to your .eslintrc\n\nSee [Airbnb's overarching ESLint config](https://npmjs.com/eslint-config-airbnb), [Airbnb's Javascript styleguide](https://github.com/airbnb/javascript), and the [ESlint config docs](http://eslint.org/docs/user-guide/configuring#extending-configuration-files) for more information.\n\n## Rules be overwritten\n\n### best-practices\n\n```\n- 'class-methods-use-this': 'off'\n- 'consistent-return': 'off'\n```\n\n#### errors\n\n```\n- 'comma-dangle': ['error', {\n    arrays: 'always-multiline',\n    objects: 'always-multiline',\n    imports: 'always-multiline',\n    exports: 'always-multiline',\n    functions: 'ignore',\n  }]\n```\n\n#### es6\n\n```\n- 'arrow-parens': ['error', 'as-needed']\n- 'prefer-arrow-callback': ['error', { allowNamedFunctions: true }]\n- 'prefer-destructuring': [\n  'error',\n  {\n    VariableDeclarator: {\n      array: false,\n      object: true\n    },\n    AssignmentExpression: {\n      array: false,\n      object: false\n    }\n  },\n  {\n    enforceForRenamedProperties: false\n  }\n]\n```\n\n#### import\n\n```\n- import/prefer-default-export: 'off'\n- import/order: ['error', {\n  groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'],\n  'newlines-between': 'always',\n}]\n- import/no-extraneous-dependencies: ['error', {\n  devDependencies: [\n    '**/__tests__/*.spec.js',\n    '**/__stories__/*.story.js',\n    '**/scripts/*.js',\n    '**/test/**/*.js',\n    '**/webpack.config.*.js',\n  ],\n}]\n```\n\n#### node\n\n```\n- 'global-require': 'off'\n```\n\n#### style\n\n```\n- linebreak-style: 'off'\n- max-len: ['error', 100, 2, {\n  ignorePattern: ' // eslint-disable-line ',\n  ignoreUrls: true,\n  ignoreComments: false,\n  ignoreStrings: true,\n  ignoreTemplateLiterals: true,\n  ignoreRegExpLiterals: true,\n}]\n- no-plusplus: ['error', { allowForLoopAfterthoughts: true }]\n- no-underscore-dangle: 'off'\n- no-restricted-syntax: [\n  'error',\n  {\n    selector: 'ForInStatement',\n    message:\n      'for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array.',\n  },\n  {\n    selector: 'LabeledStatement',\n    message:\n      'Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand.',\n  },\n  {\n    selector: 'WithStatement',\n    message:\n      '`with` is disallowed in strict mode because it makes code impossible to predict and optimize.',\n  },\n]\n(Note: remove ForOfStatement from airbnb's no-restricted-syntax)\n```\n\n### prettier\n\n```\n- prettier/prettier: [\n  'error',\n  {\n    trailingComma: 'es5',\n    singleQuote: true\n  },\n  'arrow-body-style': 'off',\n  'prefer-arrow-callback': 'off',\n]\n```\n\n### sort-imports-es6-autofix\n\n```\n- sort-imports-es6-autofix/sort-imports-es6: [\n  'error',\n  {\n    ignoreCase: false,\n    ignoreMemberSort: false,\n    memberSyntaxSortOrder: ['single', 'multiple', 'all', 'none'],\n  },\n]\n```\n\n[npm-image]: https://badge.fury.io/js/eslint-config-yoctol-base.svg\n[npm-url]: https://npmjs.org/package/eslint-config-yoctol-base\n[travis-image]: https://travis-ci.org/Yoctol/eslint-config-yoctol-base.svg\n[travis-url]: https://travis-ci.org/Yoctol/eslint-config-yoctol-base\n[david_img]: https://david-dm.org/Yoctol/eslint-config-yoctol-base.svg\n[david_site]: https://david-dm.org/Yoctol/eslint-config-yoctol-base\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoctol%2Feslint-config-yoctol-base","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyoctol%2Feslint-config-yoctol-base","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoctol%2Feslint-config-yoctol-base/lists"}