{"name":"eslint-plugin-prefer-arrow-functions","version":"3.2.4","keywords":["es6","eslint","eslint-plugin"],"author":{"url":"https://github.com/JamieMason","name":"Jamie Mason"},"license":"MIT","_id":"eslint-plugin-prefer-arrow-functions@3.2.4","contributors":[{"url":"https://github.com/gabmontes","name":"Gabriel Montes"},{"url":"https://github.com/harelmo","name":"Harel Moshe"},{"url":"https://github.com/keithkml","name":"Keith Lea"},{"url":"https://github.com/mikeapr4","name":"Michael Gallagher"},{"url":"https://github.com/pablen","name":"Pablo Enrici"},{"url":"https://github.com/TristonJ","name":"Triston Jones"}],"homepage":"https://github.com/JamieMason/eslint-plugin-prefer-arrow-functions","bugs":{"url":"https://github.com/JamieMason/eslint-plugin-prefer-arrow-functions/issues"},"dist":{"shasum":"7bfbaab9646d1bb7cd7e29a58cfb796548c69508","tarball":"http://registry-npm.ywwl.com/eslint-plugin-prefer-arrow-functions/download/eslint-plugin-prefer-arrow-functions-3.2.4.tgz","fileCount":6,"integrity":"sha512-HbPmlbO/iYQeVs2fuShNkGVJDfVfgSd84Vzxv+xlh+nIVoSsZvTj6yOqszw4mtG9JbiqMShVWqbVeoVsejE59w==","signatures":[{"sig":"MEUCIFtB4csxUy0pvO+r7H56wXC1LgY6SmmOri+PP6wv2TcdAiEA8gKxg3QtudibWDpIyX0OVXc6ZhcgTawEtajSp3HoAQY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":22202,"size":6518,"noattachment":false,"key":"/eslint-plugin-prefer-arrow-functions/-/eslint-plugin-prefer-arrow-functions-3.2.4.tgz"},"main":"dist/index.js","gitHead":"9b76409f17deaa5d820c92adbb32cdc462fb3ec4","scripts":{"lint":"eslint --ext .ts .","test":"jest","build":"tsc --project .","format":"prettier --write './src/**/*.ts'","prelint":"npm run format","prepack":"npm run build","prebuild":"rimraf ./dist"},"_npmUser":{"name":"fold_left","email":"jamie@foldleft.io"},"repository":{"url":"git+https://github.com/JamieMason/eslint-plugin-prefer-arrow-functions.git","type":"git"},"_npmVersion":"8.1.0","description":"Convert functions to arrow functions","directories":{},"_nodeVersion":"16.13.0","_hasShrinkwrap":false,"devDependencies":{"jest":"27.3.1","eslint":"8.2.0","rimraf":"3.0.2","ts-jest":"27.0.7","prettier":"2.4.1","typescript":"4.4.4","@types/jest":"27.0.2","@types/node":"16.11.7","@typescript-eslint/parser":"5.3.1","@typescript-eslint/eslint-plugin":"5.3.1"},"peerDependencies":{"eslint":">=5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/eslint-plugin-prefer-arrow-functions_3.2.4_1698060402612_0.5239892686216465","host":"s3://npm-registry-packages"},"readme":"# eslint-plugin-prefer-arrow-functions\n\n> An ESLint Plugin to Lint and auto-fix plain Functions into Arrow Functions, in all cases where conversion would result in the same behaviour (Arrow Functions do not support `this`, `arguments`, or `new.target` for example).\n\n[![NPM version](http://img.shields.io/npm/v/eslint-plugin-prefer-arrow-functions.svg?style=flat-square)](https://www.npmjs.com/package/eslint-plugin-prefer-arrow-functions) [![NPM downloads](http://img.shields.io/npm/dm/eslint-plugin-prefer-arrow-functions.svg?style=flat-square)](https://www.npmjs.com/package/eslint-plugin-prefer-arrow-functions) [![Build Status](http://img.shields.io/travis/JamieMason/eslint-plugin-prefer-arrow-functions/master.svg?style=flat-square)](https://travis-ci.org/JamieMason/eslint-plugin-prefer-arrow-functions) [![Maintainability](https://api.codeclimate.com/v1/badges/795faa0b446ff7dddcdb/maintainability)](https://codeclimate.com/github/JamieMason/eslint-plugin-prefer-arrow-functions/maintainability)\n\n## Table of Contents\n\n-   [☁️ Installation](#️-installation)\n-   [🏓 Playground](#-playground)\n-   [⚖️ Configuration](#️-configuration)\n-   [🤔 Options](#-options)\n-   [👏🏻 Credits](#-credits)\n-   [🙋🏽‍♀️ Getting Help](#♀️-getting-help)\n-   [👀 Other Projects](#-other-projects)\n-   [🤓 Author](#-author)\n\n## ☁️ Installation\n\n    npm install --save-dev eslint eslint-plugin-prefer-arrow-functions\n\n## 🏓 Playground\n\nTry it yourself at [ASTExplorer.net](https://astexplorer.net/#/gist/7c36fe8c604945df27df210cf79dcc3c/12f01bed4dcf08f32a85f72db0851440b7e45cdd) by pasting code snippets in the top left panel, the results will appear in the bottom right panel.\n\n## ⚖️ Configuration\n\nAdd the plugin to the `plugins` section and the rule to the `rules` section in your .eslintrc. The default values for options are listed in this example.\n\n```json\n{\n  \"plugins\": [\"prefer-arrow-functions\"],\n  \"rules\": {\n    \"prefer-arrow-functions/prefer-arrow-functions\": [\n      \"warn\",\n      {\n        \"allowNamedFunctions\": false,\n        \"classPropertiesAllowed\": false,\n        \"disallowPrototype\": false,\n        \"returnStyle\": \"unchanged\",\n        \"singleReturnOnly\": false\n      }\n    ]\n  }\n}\n```\n\n## 🤔 Options\n\n### `allowNamedFunctions`\n\nIf set to true, the rule won't report named functions such as `function foo() {}`. Anonymous function such as `const foo = function() {}` will still be reported.\n\n### `classPropertiesAllowed`\n\nWhen `true`, functions defined as [class instance fields](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes#Field_declarations) will be converted to arrow functions when doing so would not alter or break their behaviour.\n\n### `disallowPrototype`\n\nWhen `true`, functions assigned to a `prototype` will be converted to arrow functions when doing so would not alter or break their behaviour.\n\n### `returnStyle`\n\n-   When `\"implicit\"`, arrow functions such as `x => { return x; }` will be converted to `x => x`.\n-   When `\"explicit\"`, arrow functions such as `x => x` will be converted to `x => { return x; }`.\n-   When `\"unchanged\"` or not set, arrow functions will be left as they were.\n\n### `singleReturnOnly`\n\nWhen `true`, only `function` declarations which _only_ contain a return statement will be converted. Functions containing block statements will be ignored.\n\n> This option works well in conjunction with ESLint's built-in [arrow-body-style](http://eslint.org/docs/rules/arrow-body-style) set to `as-needed`.\n\n## 👏🏻 Credits\n\nThis project is a fork of <https://github.com/TristonJ/eslint-plugin-prefer-arrow> by [Triston Jones](https://github.com/TristonJ).\n\n## 🙋🏽‍♀️ Getting Help\n\nGet help with issues by creating a [Bug Report] or discuss ideas by opening a [Feature Request].\n\n[bug report]: https://github.com/JamieMason/eslint-plugin-prefer-arrow-functions/issues/new?template=bug_report.md\n\n[feature request]: https://github.com/JamieMason/eslint-plugin-prefer-arrow-functions/issues/new?template=feature_request.md\n\n## 👀 Other Projects\n\nIf you find my Open Source projects useful, please share them ❤️\n\n-   [**eslint-formatter-git-log**](https://github.com/JamieMason/eslint-formatter-git-log)<br>ESLint Formatter featuring Git Author, Date, and Hash\n-   [**eslint-plugin-move-files**](https://github.com/JamieMason/eslint-plugin-move-files)<br>Move and rename files while keeping imports up to date\n-   [**ImageOptim-CLI**](https://github.com/JamieMason/ImageOptim-CLI)<br>Automates ImageOptim, ImageAlpha, and JPEGmini for Mac to make batch optimisation of images part of your automated build process.\n-   [**Jasmine-Matchers**](https://github.com/JamieMason/Jasmine-Matchers)<br>Write Beautiful Specs with Custom Matchers\n-   [**karma-benchmark**](https://github.com/JamieMason/karma-benchmark)<br>Run Benchmark.js over multiple Browsers, with CI compatible output\n-   [**self-help**](https://github.com/JamieMason/self-help#readme)<br>Interactive Q&A Guides for Web and the Command Line\n-   [**syncpack**](https://github.com/JamieMason/syncpack#readme)<br>Manage multiple package.json files, such as in Lerna Monorepos and Yarn Workspaces\n\n## 🤓 Author\n\n<img src=\"https://www.gravatar.com/avatar/acdf106ce071806278438d8c354adec8?s=100\" align=\"left\">\n\nI'm [Jamie Mason] from [Leeds] in England, I began Web Design and Development in 1999 and have been Contracting and offering Consultancy as Fold Left Ltd since 2012. Who I've worked with includes [Sky Sports], [Sky Bet], [Sky Poker], The [Premier League], [William Hill], [Shell], [Betfair], and Football Clubs including [Leeds United], [Spurs], [West Ham], [Arsenal], and more.\n\n<div align=\"center\">\n\n[![Follow JamieMason on GitHub][github badge]][github]      [![Follow fold_left on Twitter][twitter badge]][twitter]\n\n</div>\n\n<!-- images -->\n\n[github badge]: https://img.shields.io/github/followers/JamieMason.svg?style=social&label=Follow\n\n[twitter badge]: https://img.shields.io/twitter/follow/fold_left.svg?style=social&label=Follow\n\n<!-- links -->\n\n[arsenal]: https://www.arsenal.com\n\n[betfair]: https://www.betfair.com\n\n[github]: https://github.com/JamieMason\n\n[jamie mason]: https://www.linkedin.com/in/jamiemasonleeds\n\n[leeds united]: https://www.leedsunited.com/\n\n[leeds]: https://www.instagram.com/visitleeds\n\n[premier league]: https://www.premierleague.com\n\n[shell]: https://www.shell.com\n\n[sky bet]: https://www.skybet.com\n\n[sky poker]: https://www.skypoker.com\n\n[sky sports]: https://www.skysports.com\n\n[spurs]: https://www.tottenhamhotspur.com\n\n[twitter]: https://twitter.com/fold_left\n\n[west ham]: https://www.whufc.com\n\n[william hill]: https://www.williamhill.com\n","publish_time":1698060402838,"maintainers":[{"name":"fold_left","email":"jamie@foldleft.io"}],"_cnpm_publish_time":1698060402838,"dist-tags":{"latest":"3.10.2"}}