{"id":13801859,"url":"https://github.com/mathematic-inc/eslint-plugin-padding","last_synced_at":"2025-04-14T18:41:04.690Z","repository":{"id":57230106,"uuid":"321312792","full_name":"mathematic-inc/eslint-plugin-padding","owner":"mathematic-inc","description":"An ESLint plugin regarding any and all spacing between statements.","archived":false,"fork":false,"pushed_at":"2020-12-23T16:30:42.000Z","size":268,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-05-19T05:05:01.779Z","etag":null,"topics":["eslint","eslint-plugin","padding","spacing"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mathematic-inc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-14T10:29:03.000Z","updated_at":"2022-05-04T05:51:42.000Z","dependencies_parsed_at":"2022-09-14T14:50:27.060Z","dependency_job_id":null,"html_url":"https://github.com/mathematic-inc/eslint-plugin-padding","commit_stats":null,"previous_names":["mu-io/eslint-plugin-padding"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathematic-inc%2Feslint-plugin-padding","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathematic-inc%2Feslint-plugin-padding/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathematic-inc%2Feslint-plugin-padding/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathematic-inc%2Feslint-plugin-padding/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mathematic-inc","download_url":"https://codeload.github.com/mathematic-inc/eslint-plugin-padding/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248938155,"owners_count":21186354,"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-plugin","padding","spacing"],"created_at":"2024-08-04T00:01:28.775Z","updated_at":"2025-04-14T18:41:04.655Z","avatar_url":"https://github.com/mathematic-inc.png","language":"TypeScript","funding_links":[],"categories":["Plugins"],"sub_categories":["Style"],"readme":"# `eslint-plugin-padding`\n\nThis rule allows/disallows spacing between two given statements. Spacing generally helps\nreadability. This rule is a generalized version of the\n[`eslint/padding-line-between-statements`](https://eslint.org/docs/rules/padding-line-between-statements)\nrule and can also be used to replace\n[eslint/lines-between-class-members](https://eslint.org/docs/rules/lines-between-class-members).\n\n### Syntax\n\n```json\n{\n    \"padding/spacing\": [\n        \"error\",\n        { \"blankLine\": LINEBREAK_TYPE, \"prev\": STATEMENT_TYPE, \"next\": STATEMENT_TYPE },\n        { \"blankLine\": LINEBREAK_TYPE, \"prev\": STATEMENT_TYPE, \"next\": STATEMENT_TYPE },\n        { \"blankLine\": LINEBREAK_TYPE, \"prev\": STATEMENT_TYPE, \"next\": STATEMENT_TYPE },\n        { \"blankLine\": LINEBREAK_TYPE, \"prev\": STATEMENT_TYPE, \"next\": STATEMENT_TYPE },\n        ...\n    ]\n}\n```\n\n- `LINEBREAK_TYPE` is one of the following.\n\n  - `\"any\"` just ignores the statement pair.\n  - `\"never\"` disallows blank lines.\n  - `\"always\"` requires one or more blank lines. Note it does not count lines that comments exist as\n    blank lines. te it does not count lines that comments exist as blank lines.\n\n- `STATEMENT_TYPE` is one (or an array) of the following:\n\n  1. A space-delimited list of keyword (e.g. `\"const\"`, `\"export const\"`, or `\"class\"`)\n  2. One of the following:\n\n     - `\"*\"` is wildcard. This matches any statements.\n     - `\"block-like\"` - block like statements. This matches statements that the last token is the\n       closing brace of blocks; e.g. `{ }`, `if (a) { }`, and `while (a) { }`. Also matches immediately\n       invoked function expression statements.\n     - `\"exports\"` - `export` statements of CommonJS; e.g. `module.exports = 0`,\n       `module.exports.foo = 1`, and `exports.foo = 2`.\n     - `\"require\"` - `require` statements of CommonJS; e.g. `const foo = require(\"foo\")`.\n     - `\"directive\"` - directive prologues. This matches directives; e.g. `\"use strict\"`.\n     - `\"iife\"` - immediately invoked function expression statements. This matches calls on a function\n       expression, optionally prefixed with a unary operator.\n  - An object of the form\n\n    ```json\n    {\n      \"type\": NODE_TYPE | undefined,\n      \"keyword\": KEYWORD | undefined,\n      \"inline\": boolean | undefined\n      \"comment\": boolean | 'line' | 'block' | undefined\n    }\n    ```\n\n    where\n\n    - `NODE_TYPE` is the name of an `ESTree` node type, e.g. `\"FunctionDeclaration\"`. You can use an\n      [`AST explorer`](https://astexplorer.net) to get the name of a particular node.\n    - `KEYWORD` is one (or an array) of either (i) or (ii).\n    - `\"inline\"` is a flag that denotes the node must span multiple lines (`false`) or a single\n      line (`true`)\n    - `\"comment\"` specifies the particular node has a comment before it. String options declare a specific type.\n\n## When Not To Use It\n\nIf you don't want to notify warnings about linebreaks, then it's safe to disable this rule.\n\n\u003csup\u003eTaken with ❤️\n[from ESLint core](https://eslint.org/docs/rules/padding-line-between-statements#require-or-disallow-padding-lines-between-statements-padding-line-between-statements)\u003c/sup\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathematic-inc%2Feslint-plugin-padding","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmathematic-inc%2Feslint-plugin-padding","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathematic-inc%2Feslint-plugin-padding/lists"}