Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Deprecate formatting rules #17696

Merged
merged 7 commits into from Nov 3, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/rules/array-bracket-newline.js
@@ -1,6 +1,7 @@
/**
* @fileoverview Rule to enforce linebreaks after open and before close array brackets
* @author Jan Peer Stöcklmair <https://github.com/JPeer264>
* @deprecated in ESLint v8.53.0
*/

"use strict";
Expand All @@ -14,6 +15,8 @@ const astUtils = require("./utils/ast-utils");
/** @type {import('../shared/types').Rule} */
module.exports = {
meta: {
deprecated: true,
replacedBy: [],
type: "layout",

docs: {
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/array-bracket-spacing.js
@@ -1,6 +1,7 @@
/**
* @fileoverview Disallows or enforces spaces inside of array brackets.
* @author Jamund Ferguson
* @deprecated in ESLint v8.53.0
*/
"use strict";

Expand All @@ -13,6 +14,8 @@ const astUtils = require("./utils/ast-utils");
/** @type {import('../shared/types').Rule} */
module.exports = {
meta: {
deprecated: true,
replacedBy: [],
type: "layout",

docs: {
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/array-element-newline.js
@@ -1,6 +1,7 @@
/**
* @fileoverview Rule to enforce line breaks after each array element
* @author Jan Peer Stöcklmair <https://github.com/JPeer264>
* @deprecated in ESLint v8.53.0
*/

"use strict";
Expand All @@ -14,6 +15,8 @@ const astUtils = require("./utils/ast-utils");
/** @type {import('../shared/types').Rule} */
module.exports = {
meta: {
deprecated: true,
replacedBy: [],
type: "layout",

docs: {
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/arrow-parens.js
@@ -1,6 +1,7 @@
/**
* @fileoverview Rule to require parens in arrow function arguments.
* @author Jxck
* @deprecated in ESLint v8.53.0
*/
"use strict";

Expand Down Expand Up @@ -30,6 +31,8 @@ function hasBlockBody(node) {
/** @type {import('../shared/types').Rule} */
module.exports = {
meta: {
deprecated: true,
replacedBy: [],
type: "layout",

docs: {
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/arrow-spacing.js
@@ -1,6 +1,7 @@
/**
* @fileoverview Rule to define spacing before/after arrow function's arrow.
* @author Jxck
* @deprecated in ESLint v8.53.0
*/
"use strict";

Expand All @@ -17,6 +18,8 @@ const astUtils = require("./utils/ast-utils");
/** @type {import('../shared/types').Rule} */
module.exports = {
meta: {
deprecated: true,
replacedBy: [],
type: "layout",

docs: {
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/block-spacing.js
@@ -1,6 +1,7 @@
/**
* @fileoverview A rule to disallow or enforce spaces inside of single line blocks.
* @author Toru Nagashima
* @deprecated in ESLint v8.53.0
*/

"use strict";
Expand All @@ -14,6 +15,8 @@ const util = require("./utils/ast-utils");
/** @type {import('../shared/types').Rule} */
module.exports = {
meta: {
deprecated: true,
replacedBy: [],
type: "layout",

docs: {
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/brace-style.js
@@ -1,6 +1,7 @@
/**
* @fileoverview Rule to flag block statements that do not use the one true brace style
* @author Ian Christian Myers
* @deprecated in ESLint v8.53.0
*/

"use strict";
Expand All @@ -14,6 +15,8 @@ const astUtils = require("./utils/ast-utils");
/** @type {import('../shared/types').Rule} */
module.exports = {
meta: {
deprecated: true,
replacedBy: [],
type: "layout",

docs: {
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/comma-dangle.js
@@ -1,6 +1,7 @@
/**
* @fileoverview Rule to forbid or enforce dangling commas.
* @author Ian Christian Myers
* @deprecated in ESLint v8.53.0
*/

"use strict";
Expand Down Expand Up @@ -73,6 +74,8 @@ function normalizeOptions(optionValue, ecmaVersion) {
/** @type {import('../shared/types').Rule} */
module.exports = {
meta: {
deprecated: true,
replacedBy: [],
type: "layout",

docs: {
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/comma-spacing.js
@@ -1,6 +1,7 @@
/**
* @fileoverview Comma spacing - validates spacing before and after comma
* @author Vignesh Anand aka vegetableman.
* @deprecated in ESLint v8.53.0
*/
"use strict";

Expand All @@ -13,6 +14,8 @@ const astUtils = require("./utils/ast-utils");
/** @type {import('../shared/types').Rule} */
module.exports = {
meta: {
deprecated: true,
replacedBy: [],
type: "layout",

docs: {
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/comma-style.js
@@ -1,6 +1,7 @@
/**
* @fileoverview Comma style - enforces comma styles of two types: last and first
* @author Vignesh Anand aka vegetableman
* @deprecated in ESLint v8.53.0
*/

"use strict";
Expand All @@ -14,6 +15,8 @@ const astUtils = require("./utils/ast-utils");
/** @type {import('../shared/types').Rule} */
module.exports = {
meta: {
deprecated: true,
replacedBy: [],
type: "layout",

docs: {
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/computed-property-spacing.js
@@ -1,6 +1,7 @@
/**
* @fileoverview Disallows or enforces spaces inside computed properties.
* @author Jamund Ferguson
* @deprecated in ESLint v8.53.0
*/
"use strict";

Expand All @@ -13,6 +14,8 @@ const astUtils = require("./utils/ast-utils");
/** @type {import('../shared/types').Rule} */
module.exports = {
meta: {
deprecated: true,
replacedBy: [],
type: "layout",

docs: {
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/dot-location.js
@@ -1,6 +1,7 @@
/**
* @fileoverview Validates newlines before and after dots
* @author Greg Cochard
* @deprecated in ESLint v8.53.0
*/

"use strict";
Expand All @@ -14,6 +15,8 @@ const astUtils = require("./utils/ast-utils");
/** @type {import('../shared/types').Rule} */
module.exports = {
meta: {
deprecated: true,
replacedBy: [],
type: "layout",

docs: {
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/eol-last.js
@@ -1,6 +1,7 @@
/**
* @fileoverview Require or disallow newline at the end of files
* @author Nodeca Team <https://github.com/nodeca>
* @deprecated in ESLint v8.53.0
*/
"use strict";

Expand All @@ -11,6 +12,8 @@
/** @type {import('../shared/types').Rule} */
module.exports = {
meta: {
deprecated: true,
replacedBy: [],
type: "layout",

docs: {
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/func-call-spacing.js
@@ -1,6 +1,7 @@
/**
* @fileoverview Rule to control spacing within function calls
* @author Matt DuVall <http://www.mattduvall.com>
* @deprecated in ESLint v8.53.0
*/

"use strict";
Expand All @@ -18,6 +19,8 @@ const astUtils = require("./utils/ast-utils");
/** @type {import('../shared/types').Rule} */
module.exports = {
meta: {
deprecated: true,
replacedBy: [],
type: "layout",

docs: {
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/function-call-argument-newline.js
@@ -1,6 +1,7 @@
/**
* @fileoverview Rule to enforce line breaks between arguments of a function call
* @author Alexey Gonchar <https://github.com/finico>
* @deprecated in ESLint v8.53.0
*/

"use strict";
Expand All @@ -12,6 +13,8 @@
/** @type {import('../shared/types').Rule} */
module.exports = {
meta: {
deprecated: true,
replacedBy: [],
type: "layout",

docs: {
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/function-paren-newline.js
@@ -1,6 +1,7 @@
/**
* @fileoverview enforce consistent line breaks inside function parentheses
* @author Teddy Katz
* @deprecated in ESLint v8.53.0
*/
"use strict";

Expand All @@ -17,6 +18,8 @@ const astUtils = require("./utils/ast-utils");
/** @type {import('../shared/types').Rule} */
module.exports = {
meta: {
deprecated: true,
replacedBy: [],
type: "layout",

docs: {
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/generator-star-spacing.js
@@ -1,6 +1,7 @@
/**
* @fileoverview Rule to check the spacing around the * in generator functions.
* @author Jamund Ferguson
* @deprecated in ESLint v8.53.0
*/

"use strict";
Expand Down Expand Up @@ -28,6 +29,8 @@ const OVERRIDE_SCHEMA = {
/** @type {import('../shared/types').Rule} */
module.exports = {
meta: {
deprecated: true,
replacedBy: [],
type: "layout",

docs: {
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/implicit-arrow-linebreak.js
@@ -1,6 +1,7 @@
/**
* @fileoverview enforce the location of arrow function bodies
* @author Sharmila Jesupaul
* @deprecated in ESLint v8.53.0
*/
"use strict";

Expand All @@ -12,6 +13,8 @@ const { isCommentToken, isNotOpeningParenToken } = require("./utils/ast-utils");
/** @type {import('../shared/types').Rule} */
module.exports = {
meta: {
deprecated: true,
replacedBy: [],
type: "layout",

docs: {
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/indent.js
Expand Up @@ -4,6 +4,7 @@
* @author Teddy Katz
* @author Vitaly Puzrin
* @author Gyandeep Singh
* @deprecated in ESLint v8.53.0
*/

"use strict";
Expand Down Expand Up @@ -493,6 +494,8 @@ const ELEMENT_LIST_SCHEMA = {
/** @type {import('../shared/types').Rule} */
module.exports = {
meta: {
deprecated: true,
replacedBy: [],
type: "layout",

docs: {
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/jsx-quotes.js
@@ -1,6 +1,7 @@
/**
* @fileoverview A rule to ensure consistent quotes used in jsx syntax.
* @author Mathias Schreck <https://github.com/lo1tuma>
* @deprecated in ESLint v8.53.0
*/

"use strict";
Expand Down Expand Up @@ -39,6 +40,8 @@ const QUOTE_SETTINGS = {
/** @type {import('../shared/types').Rule} */
module.exports = {
meta: {
deprecated: true,
replacedBy: [],
type: "layout",

docs: {
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/key-spacing.js
@@ -1,6 +1,7 @@
/**
* @fileoverview Rule to specify spacing of object literal keys and values
* @author Brandon Mills
* @deprecated in ESLint v8.53.0
*/
"use strict";

Expand Down Expand Up @@ -133,6 +134,8 @@ function initOptions(toOptions, fromOptions) {
/** @type {import('../shared/types').Rule} */
module.exports = {
meta: {
deprecated: true,
replacedBy: [],
type: "layout",

docs: {
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/keyword-spacing.js
@@ -1,6 +1,7 @@
/**
* @fileoverview Rule to enforce spacing before and after keywords.
* @author Toru Nagashima
* @deprecated in ESLint v8.53.0
*/

"use strict";
Expand Down Expand Up @@ -64,6 +65,8 @@ function isCloseParenOfTemplate(token) {
/** @type {import('../shared/types').Rule} */
module.exports = {
meta: {
deprecated: true,
replacedBy: [],
type: "layout",

docs: {
Expand Down
3 changes: 3 additions & 0 deletions lib/rules/linebreak-style.js
@@ -1,6 +1,7 @@
/**
* @fileoverview Rule to enforce a single linebreak style.
* @author Erik Mueller
* @deprecated in ESLint v8.53.0
*/

"use strict";
Expand All @@ -18,6 +19,8 @@ const astUtils = require("./utils/ast-utils");
/** @type {import('../shared/types').Rule} */
module.exports = {
meta: {
deprecated: true,
replacedBy: [],
type: "layout",

docs: {
Expand Down