@storm-software/eslint 0.57.0 → 0.59.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -21,7 +21,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
21
21
 
22
22
  <h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
23
23
 
24
- [![Version](https://img.shields.io/badge/version-0.56.0-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
24
+ [![Version](https://img.shields.io/badge/version-0.59.0-1fb2a6.svg?style=for-the-badge&color=1fb2a6)](https://prettier.io/)&nbsp;[![Nx](https://img.shields.io/badge/Nx-17.0.2-lightgrey?style=for-the-badge&logo=nx&logoWidth=20&&color=1fb2a6)](http://nx.dev/)&nbsp;[![NextJs](https://img.shields.io/badge/Next.js-14.0.2-lightgrey?style=for-the-badge&logo=nextdotjs&logoWidth=20&color=1fb2a6)](https://nextjs.org/)&nbsp;[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=for-the-badge&logo=commitlint&color=1fb2a6)](http://commitizen.github.io/cz-cli/)&nbsp;![Semantic-Release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=for-the-badge&color=1fb2a6)&nbsp;[![documented with Fumadocs](https://img.shields.io/badge/documented_with-fumadocs-success.svg?style=for-the-badge&logo=readthedocs&color=1fb2a6)](https://fumadocs.vercel.app/)&nbsp;![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/storm-software/storm-ops/cr.yml?style=for-the-badge&logo=github-actions&color=1fb2a6)
25
25
 
26
26
  <!-- prettier-ignore-start -->
27
27
  <!-- markdownlint-disable -->
package/dist/preset.mjs CHANGED
@@ -1194,6 +1194,11 @@ const config$2 = {
1194
1194
  };
1195
1195
 
1196
1196
  const config$1 = {
1197
+ /*************************************************************
1198
+ *
1199
+ * Base Rules - The core rules that lint for common problems
1200
+ *
1201
+ **************************************************************/
1197
1202
  /**
1198
1203
  * Require return statements in array methods callbacks.
1199
1204
  *
@@ -1423,14 +1428,712 @@ const config$1 = {
1423
1428
  * 🔧 Fixable - https://eslint.org/docs/rules/yoda
1424
1429
  */
1425
1430
  yoda: "warn",
1426
- "unicorn/number-literal-case": "off",
1427
- "unicorn/template-indent": "off",
1428
- "unicorn/prevent-abbreviations": "off",
1429
- "unicorn/no-await-expression-member": "off",
1430
- "unicorn/no-useless-undefined": "off",
1431
- "unicorn/no-array-push-push": "off",
1432
- "unicorn/no-array-reduce": "off",
1433
- "unicorn/no-useless-switch-case": "off",
1431
+ // Enforce “for” loop update clause moving the counter in the right direction
1432
+ // https://eslint.org/docs/rules/for-direction
1433
+ "for-direction": "error",
1434
+ // Enforces that a return statement is present in property getters
1435
+ // https://eslint.org/docs/rules/getter-return
1436
+ "getter-return": ["error", { allowImplicit: true }],
1437
+ // disallow using an async function as a Promise executor
1438
+ // https://eslint.org/docs/rules/no-async-promise-executor
1439
+ "no-async-promise-executor": "error",
1440
+ // Disallow await inside of loops
1441
+ // https://eslint.org/docs/rules/no-await-in-loop
1442
+ "no-await-in-loop": "error",
1443
+ // Disallow comparisons to negative zero
1444
+ // https://eslint.org/docs/rules/no-compare-neg-zero
1445
+ "no-compare-neg-zero": "error",
1446
+ // disallow assignment in conditional expressions
1447
+ "no-cond-assign": ["error", "always"],
1448
+ // disallow use of console
1449
+ "no-console": "error",
1450
+ // Disallows expressions where the operation doesn't affect the value
1451
+ // https://eslint.org/docs/rules/no-constant-binary-expression
1452
+ // TODO: semver-major, enable
1453
+ "no-constant-binary-expression": "off",
1454
+ // disallow use of constant expressions in conditions
1455
+ "no-constant-condition": "warn",
1456
+ // disallow control characters in regular expressions
1457
+ "no-control-regex": "error",
1458
+ // disallow use of debugger
1459
+ "no-debugger": "warn",
1460
+ // disallow duplicate arguments in functions
1461
+ "no-dupe-args": "error",
1462
+ // Disallow duplicate conditions in if-else-if chains
1463
+ // https://eslint.org/docs/rules/no-dupe-else-if
1464
+ "no-dupe-else-if": "error",
1465
+ // disallow duplicate keys when creating object literals
1466
+ "no-dupe-keys": "error",
1467
+ // disallow a duplicate case label.
1468
+ "no-duplicate-case": "error",
1469
+ // disallow empty statements
1470
+ "no-empty": "error",
1471
+ // disallow the use of empty character classes in regular expressions
1472
+ "no-empty-character-class": "error",
1473
+ // disallow assigning to the exception in a catch block
1474
+ "no-ex-assign": "error",
1475
+ // disallow double-negation boolean casts in a boolean context
1476
+ // https://eslint.org/docs/rules/no-extra-boolean-cast
1477
+ "no-extra-boolean-cast": "error",
1478
+ // disallow unnecessary parentheses
1479
+ // https://eslint.org/docs/rules/no-extra-parens
1480
+ "no-extra-parens": [
1481
+ "off",
1482
+ "all",
1483
+ {
1484
+ conditionalAssign: true,
1485
+ nestedBinaryExpressions: false,
1486
+ returnAssign: false,
1487
+ ignoreJSX: "all",
1488
+ // delegate to eslint-plugin-react
1489
+ enforceForArrowConditionals: false
1490
+ }
1491
+ ],
1492
+ // disallow unnecessary semicolons
1493
+ "no-extra-semi": "error",
1494
+ // disallow overwriting functions written as function declarations
1495
+ "no-func-assign": "off",
1496
+ // https://eslint.org/docs/rules/no-import-assign
1497
+ "no-import-assign": "error",
1498
+ // disallow function or variable declarations in nested blocks
1499
+ "no-inner-declarations": "warn",
1500
+ // disallow invalid regular expression strings in the RegExp constructor
1501
+ "no-invalid-regexp": "error",
1502
+ // disallow irregular whitespace outside of strings and comments
1503
+ "no-irregular-whitespace": "error",
1504
+ // Disallow Number Literals That Lose Precision
1505
+ // https://eslint.org/docs/rules/no-loss-of-precision
1506
+ "no-loss-of-precision": "error",
1507
+ // Disallow characters which are made with multiple code points in character class syntax
1508
+ // https://eslint.org/docs/rules/no-misleading-character-class
1509
+ "no-misleading-character-class": "error",
1510
+ // disallow the use of object properties of the global object (Math and JSON) as functions
1511
+ "no-obj-calls": "error",
1512
+ // Disallow new operators with global non-constructor functions
1513
+ // https://eslint.org/docs/latest/rules/no-new-native-nonconstructor
1514
+ // TODO: semver-major, enable
1515
+ "no-new-native-nonconstructor": "off",
1516
+ // Disallow returning values from Promise executor functions
1517
+ // https://eslint.org/docs/rules/no-promise-executor-return
1518
+ "no-promise-executor-return": "error",
1519
+ // disallow use of Object.prototypes builtins directly
1520
+ // https://eslint.org/docs/rules/no-prototype-builtins
1521
+ "no-prototype-builtins": "error",
1522
+ // disallow multiple spaces in a regular expression literal
1523
+ "no-regex-spaces": "error",
1524
+ // Disallow returning values from setters
1525
+ // https://eslint.org/docs/rules/no-setter-return
1526
+ "no-setter-return": "error",
1527
+ // disallow sparse arrays
1528
+ "no-sparse-arrays": "error",
1529
+ // Disallow template literal placeholder syntax in regular strings
1530
+ // https://eslint.org/docs/rules/no-template-curly-in-string
1531
+ "no-template-curly-in-string": "error",
1532
+ // Avoid code that looks like two expressions but is actually one
1533
+ // https://eslint.org/docs/rules/no-unexpected-multiline
1534
+ "no-unexpected-multiline": "error",
1535
+ // disallow unreachable statements after a return, throw, continue, or break statement
1536
+ "no-unreachable": "error",
1537
+ // Disallow loops with a body that allows only one iteration
1538
+ // https://eslint.org/docs/rules/no-unreachable-loop
1539
+ "no-unreachable-loop": [
1540
+ "error",
1541
+ {
1542
+ ignore: []
1543
+ // WhileStatement, DoWhileStatement, ForStatement, ForInStatement, ForOfStatement
1544
+ }
1545
+ ],
1546
+ // disallow return/throw/break/continue inside finally blocks
1547
+ // https://eslint.org/docs/rules/no-unsafe-finally
1548
+ "no-unsafe-finally": "error",
1549
+ // disallow negating the left operand of relational operators
1550
+ // https://eslint.org/docs/rules/no-unsafe-negation
1551
+ "no-unsafe-negation": "error",
1552
+ // disallow use of optional chaining in contexts where the undefined value is not allowed
1553
+ // https://eslint.org/docs/rules/no-unsafe-optional-chaining
1554
+ "no-unsafe-optional-chaining": [
1555
+ "error",
1556
+ { disallowArithmeticOperators: true }
1557
+ ],
1558
+ // Disallow Unused Private Class Members
1559
+ // https://eslint.org/docs/rules/no-unused-private-class-members
1560
+ // TODO: enable once eslint 7 is dropped (which is semver-major)
1561
+ "no-unused-private-class-members": "off",
1562
+ // Disallow useless backreferences in regular expressions
1563
+ // https://eslint.org/docs/rules/no-useless-backreference
1564
+ "no-useless-backreference": "error",
1565
+ // disallow negation of the left operand of an in expression
1566
+ // deprecated in favor of no-unsafe-negation
1567
+ "no-negated-in-lhs": "off",
1568
+ // Disallow assignments that can lead to race conditions due to usage of await or yield
1569
+ // https://eslint.org/docs/rules/require-atomic-updates
1570
+ // note: not enabled because it is very buggy
1571
+ "require-atomic-updates": "off",
1572
+ // disallow comparisons with the value NaN
1573
+ "use-isnan": "error",
1574
+ // ensure JSDoc comments are valid
1575
+ // https://eslint.org/docs/rules/valid-jsdoc
1576
+ "valid-jsdoc": "off",
1577
+ // ensure that the results of typeof are compared against a valid string
1578
+ // https://eslint.org/docs/rules/valid-typeof
1579
+ "valid-typeof": ["error", { requireStringLiterals: true }],
1580
+ /*************************************************************
1581
+ *
1582
+ * Stylistic Rules - These rules relate to style guidelines
1583
+ *
1584
+ **************************************************************/
1585
+ // enforce line breaks after opening and before closing array brackets
1586
+ // https://eslint.org/docs/rules/array-bracket-newline
1587
+ // TODO: enable? semver-major
1588
+ "array-bracket-newline": ["off", "consistent"],
1589
+ // object option alternative: { multiline: true, minItems: 3 }
1590
+ // enforce line breaks between array elements
1591
+ // https://eslint.org/docs/rules/array-element-newline
1592
+ // TODO: enable? semver-major
1593
+ "array-element-newline": ["off", { multiline: true, minItems: 3 }],
1594
+ // enforce spacing inside array brackets
1595
+ "array-bracket-spacing": ["error", "never"],
1596
+ // enforce spacing inside single-line blocks
1597
+ // https://eslint.org/docs/rules/block-spacing
1598
+ "block-spacing": ["error", "always"],
1599
+ // enforce one true brace style
1600
+ "brace-style": ["error", "1tbs", { allowSingleLine: true }],
1601
+ // require camel case names
1602
+ camelcase: ["error", { properties: "never", ignoreDestructuring: false }],
1603
+ // enforce or disallow capitalization of the first letter of a comment
1604
+ // https://eslint.org/docs/rules/capitalized-comments
1605
+ "capitalized-comments": [
1606
+ "off",
1607
+ "never",
1608
+ {
1609
+ line: {
1610
+ ignorePattern: ".*",
1611
+ ignoreInlineComments: true,
1612
+ ignoreConsecutiveComments: true
1613
+ },
1614
+ block: {
1615
+ ignorePattern: ".*",
1616
+ ignoreInlineComments: true,
1617
+ ignoreConsecutiveComments: true
1618
+ }
1619
+ }
1620
+ ],
1621
+ // require trailing commas in multiline object literals
1622
+ "comma-dangle": [
1623
+ "error",
1624
+ {
1625
+ arrays: "always-multiline",
1626
+ objects: "always-multiline",
1627
+ imports: "always-multiline",
1628
+ exports: "always-multiline",
1629
+ functions: "always-multiline"
1630
+ }
1631
+ ],
1632
+ // enforce spacing before and after comma
1633
+ "comma-spacing": ["error", { before: false, after: true }],
1634
+ // enforce one true comma style
1635
+ "comma-style": [
1636
+ "error",
1637
+ "last",
1638
+ {
1639
+ exceptions: {
1640
+ ArrayExpression: false,
1641
+ ArrayPattern: false,
1642
+ ArrowFunctionExpression: false,
1643
+ CallExpression: false,
1644
+ FunctionDeclaration: false,
1645
+ FunctionExpression: false,
1646
+ ImportDeclaration: false,
1647
+ ObjectExpression: false,
1648
+ ObjectPattern: false,
1649
+ VariableDeclaration: false,
1650
+ NewExpression: false
1651
+ }
1652
+ }
1653
+ ],
1654
+ // disallow padding inside computed properties
1655
+ "computed-property-spacing": ["error", "never"],
1656
+ // enforces consistent naming when capturing the current execution context
1657
+ "consistent-this": "off",
1658
+ // enforce newline at the end of file, with no multiple empty lines
1659
+ "eol-last": ["error", "always"],
1660
+ // https://eslint.org/docs/rules/function-call-argument-newline
1661
+ "function-call-argument-newline": ["error", "consistent"],
1662
+ // enforce spacing between functions and their invocations
1663
+ // https://eslint.org/docs/rules/func-call-spacing
1664
+ "func-call-spacing": ["error", "never"],
1665
+ // requires function names to match the name of the variable or property to which they are
1666
+ // assigned
1667
+ // https://eslint.org/docs/rules/func-name-matching
1668
+ "func-name-matching": [
1669
+ "off",
1670
+ "always",
1671
+ {
1672
+ includeCommonJSModuleExports: false,
1673
+ considerPropertyDescriptor: true
1674
+ }
1675
+ ],
1676
+ // require function expressions to have a name
1677
+ // https://eslint.org/docs/rules/func-names
1678
+ "func-names": "warn",
1679
+ // enforces use of function declarations or expressions
1680
+ // https://eslint.org/docs/rules/func-style
1681
+ // TODO: enable
1682
+ "func-style": ["off", "expression"],
1683
+ // require line breaks inside function parentheses if there are line breaks between parameters
1684
+ // https://eslint.org/docs/rules/function-paren-newline
1685
+ "function-paren-newline": ["error", "multiline-arguments"],
1686
+ // disallow specified identifiers
1687
+ // https://eslint.org/docs/rules/id-denylist
1688
+ "id-denylist": "off",
1689
+ // this option enforces minimum and maximum identifier lengths
1690
+ // (variable names, property names etc.)
1691
+ "id-length": "off",
1692
+ // require identifiers to match the provided regular expression
1693
+ "id-match": "off",
1694
+ // Enforce the location of arrow function bodies with implicit returns
1695
+ // https://eslint.org/docs/rules/implicit-arrow-linebreak
1696
+ "implicit-arrow-linebreak": ["error", "beside"],
1697
+ // this option sets a specific tab width for your code
1698
+ // https://eslint.org/docs/rules/indent
1699
+ indent: [
1700
+ "error",
1701
+ 2,
1702
+ {
1703
+ SwitchCase: 1,
1704
+ VariableDeclarator: 1,
1705
+ outerIIFEBody: 1,
1706
+ // MemberExpression: null,
1707
+ FunctionDeclaration: {
1708
+ parameters: 1,
1709
+ body: 1
1710
+ },
1711
+ FunctionExpression: {
1712
+ parameters: 1,
1713
+ body: 1
1714
+ },
1715
+ CallExpression: {
1716
+ arguments: 1
1717
+ },
1718
+ ArrayExpression: 1,
1719
+ ObjectExpression: 1,
1720
+ ImportDeclaration: 1,
1721
+ flatTernaryExpressions: false,
1722
+ // list derived from https://github.com/benjamn/ast-types/blob/HEAD/def/jsx.js
1723
+ ignoredNodes: [
1724
+ "JSXElement",
1725
+ "JSXElement > *",
1726
+ "JSXAttribute",
1727
+ "JSXIdentifier",
1728
+ "JSXNamespacedName",
1729
+ "JSXMemberExpression",
1730
+ "JSXSpreadAttribute",
1731
+ "JSXExpressionContainer",
1732
+ "JSXOpeningElement",
1733
+ "JSXClosingElement",
1734
+ "JSXFragment",
1735
+ "JSXOpeningFragment",
1736
+ "JSXClosingFragment",
1737
+ "JSXText",
1738
+ "JSXEmptyExpression",
1739
+ "JSXSpreadChild"
1740
+ ],
1741
+ ignoreComments: false
1742
+ }
1743
+ ],
1744
+ // specify whether double or single quotes should be used in JSX attributes
1745
+ // https://eslint.org/docs/rules/jsx-quotes
1746
+ "jsx-quotes": ["off", "prefer-double"],
1747
+ // enforces spacing between keys and values in object literal properties
1748
+ "key-spacing": ["error", { beforeColon: false, afterColon: true }],
1749
+ // require a space before & after certain keywords
1750
+ "keyword-spacing": [
1751
+ "error",
1752
+ {
1753
+ before: true,
1754
+ after: true,
1755
+ overrides: {
1756
+ return: { after: true },
1757
+ throw: { after: true },
1758
+ case: { after: true }
1759
+ }
1760
+ }
1761
+ ],
1762
+ // enforce position of line comments
1763
+ // https://eslint.org/docs/rules/line-comment-position
1764
+ // TODO: enable?
1765
+ "line-comment-position": [
1766
+ "off",
1767
+ {
1768
+ position: "above",
1769
+ ignorePattern: "",
1770
+ applyDefaultPatterns: true
1771
+ }
1772
+ ],
1773
+ // disallow mixed 'LF' and 'CRLF' as linebreaks
1774
+ // https://eslint.org/docs/rules/linebreak-style
1775
+ "linebreak-style": ["error", "unix"],
1776
+ // require or disallow an empty line between class members
1777
+ // https://eslint.org/docs/rules/lines-between-class-members
1778
+ "lines-between-class-members": [
1779
+ "error",
1780
+ "always",
1781
+ { exceptAfterSingleLine: false }
1782
+ ],
1783
+ // enforces empty lines around comments
1784
+ "lines-around-comment": "off",
1785
+ // require or disallow newlines around directives
1786
+ // https://eslint.org/docs/rules/lines-around-directive
1787
+ "lines-around-directive": [
1788
+ "error",
1789
+ {
1790
+ before: "always",
1791
+ after: "always"
1792
+ }
1793
+ ],
1794
+ // Require or disallow logical assignment logical operator shorthand
1795
+ // https://eslint.org/docs/latest/rules/logical-assignment-operators
1796
+ // TODO, semver-major: enable
1797
+ "logical-assignment-operators": [
1798
+ "off",
1799
+ "always",
1800
+ {
1801
+ enforceForIfStatements: true
1802
+ }
1803
+ ],
1804
+ // specify the maximum depth that blocks can be nested
1805
+ "max-depth": ["off", 4],
1806
+ // specify the maximum length of a line in your program
1807
+ // https://eslint.org/docs/rules/max-len
1808
+ "max-len": [
1809
+ "error",
1810
+ 100,
1811
+ 2,
1812
+ {
1813
+ ignoreUrls: true,
1814
+ ignoreComments: false,
1815
+ ignoreRegExpLiterals: true,
1816
+ ignoreStrings: true,
1817
+ ignoreTemplateLiterals: true
1818
+ }
1819
+ ],
1820
+ // specify the max number of lines in a file
1821
+ // https://eslint.org/docs/rules/max-lines
1822
+ "max-lines": [
1823
+ "off",
1824
+ {
1825
+ max: 300,
1826
+ skipBlankLines: true,
1827
+ skipComments: true
1828
+ }
1829
+ ],
1830
+ // enforce a maximum function length
1831
+ // https://eslint.org/docs/rules/max-lines-per-function
1832
+ "max-lines-per-function": [
1833
+ "off",
1834
+ {
1835
+ max: 50,
1836
+ skipBlankLines: true,
1837
+ skipComments: true,
1838
+ IIFEs: true
1839
+ }
1840
+ ],
1841
+ // specify the maximum depth callbacks can be nested
1842
+ "max-nested-callbacks": "off",
1843
+ // limits the number of parameters that can be used in the function declaration.
1844
+ "max-params": ["off", 3],
1845
+ // specify the maximum number of statement allowed in a function
1846
+ "max-statements": ["off", 10],
1847
+ // restrict the number of statements per line
1848
+ // https://eslint.org/docs/rules/max-statements-per-line
1849
+ "max-statements-per-line": ["off", { max: 1 }],
1850
+ // enforce a particular style for multiline comments
1851
+ // https://eslint.org/docs/rules/multiline-comment-style
1852
+ "multiline-comment-style": ["off", "starred-block"],
1853
+ // require multiline ternary
1854
+ // https://eslint.org/docs/rules/multiline-ternary
1855
+ // TODO: enable?
1856
+ "multiline-ternary": ["off", "never"],
1857
+ // require a capital letter for constructors
1858
+ "new-cap": [
1859
+ "error",
1860
+ {
1861
+ newIsCap: true,
1862
+ newIsCapExceptions: [],
1863
+ capIsNew: false,
1864
+ capIsNewExceptions: ["Immutable.Map", "Immutable.Set", "Immutable.List"]
1865
+ }
1866
+ ],
1867
+ // disallow the omission of parentheses when invoking a constructor with no arguments
1868
+ // https://eslint.org/docs/rules/new-parens
1869
+ "new-parens": "error",
1870
+ // allow/disallow an empty newline after var statement
1871
+ "newline-after-var": "off",
1872
+ // https://eslint.org/docs/rules/newline-before-return
1873
+ "newline-before-return": "off",
1874
+ // enforces new line after each method call in the chain to make it
1875
+ // more readable and easy to maintain
1876
+ // https://eslint.org/docs/rules/newline-per-chained-call
1877
+ "newline-per-chained-call": ["error", { ignoreChainWithDepth: 4 }],
1878
+ // disallow use of the Array constructor
1879
+ "no-array-constructor": "error",
1880
+ // disallow use of bitwise operators
1881
+ // https://eslint.org/docs/rules/no-bitwise
1882
+ "no-bitwise": "error",
1883
+ // disallow use of the continue statement
1884
+ // https://eslint.org/docs/rules/no-continue
1885
+ "no-continue": "error",
1886
+ // disallow comments inline after code
1887
+ "no-inline-comments": "off",
1888
+ // disallow if as the only statement in an else block
1889
+ // https://eslint.org/docs/rules/no-lonely-if
1890
+ "no-lonely-if": "error",
1891
+ // disallow un-paren'd mixes of different operators
1892
+ // https://eslint.org/docs/rules/no-mixed-operators
1893
+ "no-mixed-operators": [
1894
+ "error",
1895
+ {
1896
+ // the list of arithmetic groups disallows mixing `%` and `**`
1897
+ // with other arithmetic operators.
1898
+ groups: [
1899
+ ["%", "**"],
1900
+ ["%", "+"],
1901
+ ["%", "-"],
1902
+ ["%", "*"],
1903
+ ["%", "/"],
1904
+ ["/", "*"],
1905
+ ["&", "|", "<<", ">>", ">>>"],
1906
+ ["==", "!=", "===", "!=="],
1907
+ ["&&", "||"]
1908
+ ],
1909
+ allowSamePrecedence: false
1910
+ }
1911
+ ],
1912
+ // disallow mixed spaces and tabs for indentation
1913
+ "no-mixed-spaces-and-tabs": "error",
1914
+ // disallow use of chained assignment expressions
1915
+ // https://eslint.org/docs/rules/no-multi-assign
1916
+ "no-multi-assign": ["error"],
1917
+ // disallow multiple empty lines, only one newline at the end, and no new lines at the beginning
1918
+ // https://eslint.org/docs/rules/no-multiple-empty-lines
1919
+ "no-multiple-empty-lines": ["error", { max: 1, maxBOF: 0, maxEOF: 0 }],
1920
+ // disallow negated conditions
1921
+ // https://eslint.org/docs/rules/no-negated-condition
1922
+ "no-negated-condition": "off",
1923
+ // disallow nested ternary expressions
1924
+ "no-nested-ternary": "off",
1925
+ // disallow use of the Object constructor
1926
+ "no-new-object": "error",
1927
+ // disallow use of unary operators, ++ and --
1928
+ // https://eslint.org/docs/rules/no-plusplus
1929
+ "no-plusplus": "off",
1930
+ // disallow certain syntax forms
1931
+ // https://eslint.org/docs/rules/no-restricted-syntax
1932
+ "no-restricted-syntax": [
1933
+ "error",
1934
+ {
1935
+ selector: "ForInStatement",
1936
+ message: "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."
1937
+ },
1938
+ {
1939
+ selector: "ForOfStatement",
1940
+ message: "iterators/generators require regenerator-runtime, which is too heavyweight for this guide to allow them. Separately, loops should be avoided in favor of array iterations."
1941
+ },
1942
+ {
1943
+ selector: "LabeledStatement",
1944
+ message: "Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand."
1945
+ },
1946
+ {
1947
+ selector: "WithStatement",
1948
+ message: "`with` is disallowed in strict mode because it makes code impossible to predict and optimize."
1949
+ }
1950
+ ],
1951
+ // disallow space between function identifier and application
1952
+ // deprecated in favor of func-call-spacing
1953
+ "no-spaced-func": "off",
1954
+ // disallow tab characters entirely
1955
+ "no-tabs": "error",
1956
+ // disallow the use of ternary operators
1957
+ "no-ternary": "off",
1958
+ // disallow trailing whitespace at the end of lines
1959
+ "no-trailing-spaces": [
1960
+ "error",
1961
+ {
1962
+ skipBlankLines: false,
1963
+ ignoreComments: false
1964
+ }
1965
+ ],
1966
+ // disallow dangling underscores in identifiers
1967
+ // https://eslint.org/docs/rules/no-underscore-dangle
1968
+ "no-underscore-dangle": [
1969
+ "error",
1970
+ {
1971
+ allow: [],
1972
+ allowAfterThis: false,
1973
+ allowAfterSuper: false,
1974
+ enforceInMethodNames: true
1975
+ }
1976
+ ],
1977
+ // disallow the use of Boolean literals in conditional expressions
1978
+ // also, prefer `a || b` over `a ? a : b`
1979
+ // https://eslint.org/docs/rules/no-unneeded-ternary
1980
+ "no-unneeded-ternary": ["error", { defaultAssignment: false }],
1981
+ // disallow whitespace before properties
1982
+ // https://eslint.org/docs/rules/no-whitespace-before-property
1983
+ "no-whitespace-before-property": "error",
1984
+ // enforce the location of single-line statements
1985
+ // https://eslint.org/docs/rules/nonblock-statement-body-position
1986
+ "nonblock-statement-body-position": ["error", "beside", { overrides: {} }],
1987
+ // require padding inside curly braces
1988
+ "object-curly-spacing": ["error", "always"],
1989
+ // enforce line breaks between braces
1990
+ // https://eslint.org/docs/rules/object-curly-newline
1991
+ "object-curly-newline": [
1992
+ "error",
1993
+ {
1994
+ ObjectExpression: {
1995
+ minProperties: 4,
1996
+ multiline: true,
1997
+ consistent: true
1998
+ },
1999
+ ObjectPattern: { minProperties: 4, multiline: true, consistent: true },
2000
+ ImportDeclaration: {
2001
+ minProperties: 4,
2002
+ multiline: true,
2003
+ consistent: true
2004
+ },
2005
+ ExportDeclaration: {
2006
+ minProperties: 4,
2007
+ multiline: true,
2008
+ consistent: true
2009
+ }
2010
+ }
2011
+ ],
2012
+ // enforce "same line" or "multiple line" on object properties.
2013
+ // https://eslint.org/docs/rules/object-property-newline
2014
+ "object-property-newline": [
2015
+ "error",
2016
+ {
2017
+ allowAllPropertiesOnSameLine: true
2018
+ }
2019
+ ],
2020
+ // allow just one var statement per function
2021
+ "one-var": ["error", "never"],
2022
+ // require a newline around variable declaration
2023
+ // https://eslint.org/docs/rules/one-var-declaration-per-line
2024
+ "one-var-declaration-per-line": ["error", "always"],
2025
+ // require assignment operator shorthand where possible or prohibit it entirely
2026
+ // https://eslint.org/docs/rules/operator-assignment
2027
+ "operator-assignment": ["error", "always"],
2028
+ // Requires operator at the beginning of the line in multiline statements
2029
+ // https://eslint.org/docs/rules/operator-linebreak
2030
+ "operator-linebreak": ["error", "before", { overrides: { "=": "none" } }],
2031
+ // disallow padding within blocks
2032
+ "padded-blocks": [
2033
+ "error",
2034
+ {
2035
+ blocks: "never",
2036
+ classes: "never",
2037
+ switches: "never"
2038
+ },
2039
+ {
2040
+ allowSingleLineBlocks: true
2041
+ }
2042
+ ],
2043
+ // Require or disallow padding lines between statements
2044
+ // https://eslint.org/docs/rules/padding-line-between-statements
2045
+ "padding-line-between-statements": "off",
2046
+ // Disallow the use of Math.pow in favor of the ** operator
2047
+ // https://eslint.org/docs/rules/prefer-exponentiation-operator
2048
+ "prefer-exponentiation-operator": "error",
2049
+ // Prefer use of an object spread over Object.assign
2050
+ // https://eslint.org/docs/rules/prefer-object-spread
2051
+ "prefer-object-spread": "error",
2052
+ // require quotes around object literal property names
2053
+ // https://eslint.org/docs/rules/quote-props.html
2054
+ "quote-props": [
2055
+ "error",
2056
+ "as-needed",
2057
+ { keywords: false, unnecessary: true, numbers: false }
2058
+ ],
2059
+ // specify whether double or single quotes should be used
2060
+ quotes: ["error", "single", { avoidEscape: true }],
2061
+ // do not require jsdoc
2062
+ // https://eslint.org/docs/rules/require-jsdoc
2063
+ "require-jsdoc": "off",
2064
+ // require or disallow use of semicolons instead of ASI
2065
+ semi: ["error", "always"],
2066
+ // enforce spacing before and after semicolons
2067
+ "semi-spacing": ["error", { before: false, after: true }],
2068
+ // Enforce location of semicolons
2069
+ // https://eslint.org/docs/rules/semi-style
2070
+ "semi-style": ["error", "last"],
2071
+ // requires object keys to be sorted
2072
+ "sort-keys": ["off", "asc", { caseSensitive: false, natural: true }],
2073
+ // sort variables within the same declaration block
2074
+ "sort-vars": "off",
2075
+ // require or disallow space before blocks
2076
+ "space-before-blocks": "error",
2077
+ // require or disallow space before function opening parenthesis
2078
+ // https://eslint.org/docs/rules/space-before-function-paren
2079
+ "space-before-function-paren": [
2080
+ "error",
2081
+ {
2082
+ anonymous: "always",
2083
+ named: "never",
2084
+ asyncArrow: "always"
2085
+ }
2086
+ ],
2087
+ // require or disallow spaces inside parentheses
2088
+ "space-in-parens": ["error", "never"],
2089
+ // require spaces around operators
2090
+ "space-infix-ops": "error",
2091
+ // Require or disallow spaces before/after unary operators
2092
+ // https://eslint.org/docs/rules/space-unary-ops
2093
+ "space-unary-ops": [
2094
+ "error",
2095
+ {
2096
+ words: true,
2097
+ nonwords: false,
2098
+ overrides: {}
2099
+ }
2100
+ ],
2101
+ // require or disallow a space immediately following the // or /* in a comment
2102
+ // https://eslint.org/docs/rules/spaced-comment
2103
+ "spaced-comment": [
2104
+ "error",
2105
+ "always",
2106
+ {
2107
+ line: {
2108
+ exceptions: ["-", "+"],
2109
+ markers: ["=", "!", "/"]
2110
+ // space here to support sprockets directives, slash for TS /// comments
2111
+ },
2112
+ block: {
2113
+ exceptions: ["-", "+"],
2114
+ markers: ["=", "!", ":", "::"],
2115
+ // space here to support sprockets directives and flow comment types
2116
+ balanced: true
2117
+ }
2118
+ }
2119
+ ],
2120
+ // Enforce spacing around colons of switch statements
2121
+ // https://eslint.org/docs/rules/switch-colon-spacing
2122
+ "switch-colon-spacing": ["error", { after: true, before: false }],
2123
+ // Require or disallow spacing between template tags and their literals
2124
+ // https://eslint.org/docs/rules/template-tag-spacing
2125
+ "template-tag-spacing": ["error", "never"],
2126
+ // require or disallow the Unicode Byte Order Mark
2127
+ // https://eslint.org/docs/rules/unicode-bom
2128
+ "unicode-bom": ["error", "never"],
2129
+ // require regex literals to be wrapped in parentheses
2130
+ "wrap-regex": "off",
2131
+ "class-methods-use-this": "off",
2132
+ /*************************************************************
2133
+ *
2134
+ * TypeScript Rules - The following rules are specific to the TypeScript plugin
2135
+ *
2136
+ **************************************************************/
1434
2137
  "@typescript-eslint/no-explicit-any": "off",
1435
2138
  "@typescript-eslint/no-empty-function": "off",
1436
2139
  "@typescript-eslint/no-var-requires": "off",
@@ -1442,12 +2145,6 @@ const config$1 = {
1442
2145
  "warn",
1443
2146
  { varsIgnorePattern: "^_", argsIgnorePattern: "^_" }
1444
2147
  ],
1445
- "unicorn/prefer-string-replace-all": "off",
1446
- "unicorn/no-abusive-eslint-disable": "off",
1447
- "unicorn/import-style": "off",
1448
- "unicorn/prefer-module": "off",
1449
- "unicorn/consistent-function-scoping": "off",
1450
- "class-methods-use-this": "off",
1451
2148
  "@typescript-eslint/prefer-nullish-coalescing": [
1452
2149
  "error",
1453
2150
  {
@@ -1479,6 +2176,29 @@ const config$1 = {
1479
2176
  ]
1480
2177
  }
1481
2178
  ],
2179
+ /*************************************************************
2180
+ *
2181
+ * Unicorn Rules - The following rules are specific to the Unicorn plugin
2182
+ *
2183
+ **************************************************************/
2184
+ "unicorn/number-literal-case": "off",
2185
+ "unicorn/template-indent": "off",
2186
+ "unicorn/prevent-abbreviations": "off",
2187
+ "unicorn/no-await-expression-member": "off",
2188
+ "unicorn/no-useless-undefined": "off",
2189
+ "unicorn/no-array-push-push": "off",
2190
+ "unicorn/no-array-reduce": "off",
2191
+ "unicorn/no-useless-switch-case": "off",
2192
+ "unicorn/prefer-string-replace-all": "off",
2193
+ "unicorn/no-abusive-eslint-disable": "off",
2194
+ "unicorn/import-style": "off",
2195
+ "unicorn/prefer-module": "off",
2196
+ "unicorn/consistent-function-scoping": "off",
2197
+ /*************************************************************
2198
+ *
2199
+ * Nx Rules - The following rules are specific to the Nx plugin
2200
+ *
2201
+ **************************************************************/
1482
2202
  "@nx/enforce-module-boundaries": [
1483
2203
  "error",
1484
2204
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/eslint",
3
- "version": "0.57.0",
3
+ "version": "0.59.0",
4
4
  "type": "module",
5
5
  "description": "⚡ A package containing the base ESLint configuration used by Storm Software across many projects.",
6
6
  "repository": {
@@ -23,6 +23,11 @@
23
23
  "name": "Storm Software",
24
24
  "email": "contact@stormsoftware.com",
25
25
  "url": "https://stormsoftware.com"
26
+ },
27
+ {
28
+ "name": "Pat Sullivan",
29
+ "email": "admin@stormsoftware.com",
30
+ "url": "https://stormsoftware.com"
26
31
  }
27
32
  ],
28
33
  "license": "Apache-2.0",