Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
241 changes: 110 additions & 131 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,13 @@
"@babel/preset-env": "7.22.4",
"@babel/preset-flow": "7.21.4",
"@babel/preset-react": "7.22.3",
"@eslint-community/regexpp": "4.6.2",
"@typescript-eslint/eslint-plugin": "5.59.9",
"@typescript-eslint/experimental-utils": "5.59.9",
"@typescript-eslint/parser": "5.59.9",
"builtin-modules": "3.3.0",
"bytes": "3.1.2",
"eslint": "8.42.0",
"eslint": "8.47.0",
"eslint-plugin-react": "7.32.2",
"eslint-plugin-react-hooks": "4.6.0",
"eslint-plugin-sonarjs": "0.20.0",
Expand All @@ -81,7 +82,6 @@
"postcss-scss": "4.0.6",
"postcss-syntax": "0.36.2",
"postcss-value-parser": "4.2.0",
"regexpp": "3.2.0",
"run-node": "2.0.0",
"scslre": "0.2.0",
"stylelint": "15.7.0",
Expand All @@ -100,6 +100,7 @@
"@babel/preset-env",
"@babel/preset-flow",
"@babel/preset-react",
"@eslint-community/regexpp",
"builtin-modules",
"bytes",
"eslint",
Expand All @@ -116,7 +117,6 @@
"postcss-scss",
"postcss-syntax",
"postcss-value-parser",
"regexpp",
"run-node",
"scslre",
"stylelint",
Expand Down
2 changes: 1 addition & 1 deletion packages/jsts/src/rules/S2639/rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
// https://sonarsource.github.io/rspec/#/rspec/S2639/javascript

import { Rule } from 'eslint';
import { CharacterClass } from 'regexpp/ast';
import { CharacterClass } from '@eslint-community/regexpp/ast';
import { createRegExpRule } from '../helpers/regex';

export const rule: Rule.RuleModule = createRegExpRule(
Expand Down
2 changes: 1 addition & 1 deletion packages/jsts/src/rules/S5842/rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
// https://sonarsource.github.io/rspec/#/rspec/S5842/javascript

import { Rule } from 'eslint';
import { Node, Quantifier } from 'regexpp/ast';
import { Node, Quantifier } from '@eslint-community/regexpp/ast';
import { createRegExpRule } from '../helpers/regex';

export const rule: Rule.RuleModule = createRegExpRule(context => {
Expand Down
4 changes: 2 additions & 2 deletions packages/jsts/src/rules/S5843/rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

import { Rule } from 'eslint';
import * as estree from 'estree';
import * as regexpp from 'regexpp';
import * as regexpp from '@eslint-community/regexpp';
import {
Assertion,
Backreference,
Expand All @@ -31,7 +31,7 @@ import {
LookaroundAssertion,
Pattern,
Quantifier,
} from 'regexpp/ast';
} from '@eslint-community/regexpp/ast';
import {
getUniqueWriteUsage,
isBinaryPlus,
Expand Down
2 changes: 1 addition & 1 deletion packages/jsts/src/rules/S5850/rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
// https://sonarsource.github.io/rspec/#/rspec/S5850/javascript

import { Rule } from 'eslint';
import { AST } from 'regexpp';
import { AST } from '@eslint-community/regexpp';
import { createRegExpRule } from '../helpers/regex';

enum Position {
Expand Down
2 changes: 1 addition & 1 deletion packages/jsts/src/rules/S5852/rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
// https://sonarsource.github.io/rspec/#/rspec/S5852/javascript

import { Rule } from 'eslint';
import { RegExpLiteral } from 'regexpp/ast';
import { RegExpLiteral } from '@eslint-community/regexpp/ast';
import { analyse } from 'scslre';
import { createRegExpRule } from '../helpers/regex';

Expand Down
2 changes: 1 addition & 1 deletion packages/jsts/src/rules/S5856/rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import {
isStringType,
} from '../helpers';
import * as estree from 'estree';
import { RegExpValidator } from 'regexpp';
import { RegExpValidator } from '@eslint-community/regexpp';

const validator = new RegExpValidator();

Expand Down
4 changes: 2 additions & 2 deletions packages/jsts/src/rules/S5860/rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@

import { Rule, Scope } from 'eslint';
import * as estree from 'estree';
import * as regexpp from 'regexpp';
import { Backreference, CapturingGroup, RegExpLiteral } from 'regexpp/ast';
import * as regexpp from '@eslint-community/regexpp';
import { Backreference, CapturingGroup, RegExpLiteral } from '@eslint-community/regexpp/ast';
import {
getLhsVariable,
getUniqueWriteUsage,
Expand Down
2 changes: 1 addition & 1 deletion packages/jsts/src/rules/S5867/rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
// https://sonarsource.github.io/rspec/#/rspec/S5867/javascript

import { Rule } from 'eslint';
import { Character, Quantifier, RegExpLiteral } from 'regexpp/ast';
import { Character, Quantifier, RegExpLiteral } from '@eslint-community/regexpp/ast';
import { SourceLocation } from 'estree';
import { toEncodedMessage } from '../helpers';
import { createRegExpRule, getRegexpLocation } from '../helpers/regex';
Expand Down
4 changes: 2 additions & 2 deletions packages/jsts/src/rules/S5868/rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import {
getPatternFromNode,
isRegExpConstructor,
} from '../helpers/regex';
import { RegExpValidator } from 'regexpp';
import { Character, CharacterClassElement } from 'regexpp/ast';
import { RegExpValidator } from '@eslint-community/regexpp';
import { Character, CharacterClassElement } from '@eslint-community/regexpp/ast';
import * as estree from 'estree';
import { TSESTree } from '@typescript-eslint/experimental-utils';

Expand Down
2 changes: 1 addition & 1 deletion packages/jsts/src/rules/S5869/rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
// https://sonarsource.github.io/rspec/#/rspec/S5869/javascript

import { Rule } from 'eslint';
import { CharacterClass, Flags, Node, RegExpLiteral } from 'regexpp/ast';
import { CharacterClass, Flags, Node, RegExpLiteral } from '@eslint-community/regexpp/ast';
import { toEncodedMessage } from '../helpers';
import {
createRegExpRule,
Expand Down
2 changes: 1 addition & 1 deletion packages/jsts/src/rules/S6019/rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
// https://sonarsource.github.io/rspec/#/rspec/S6019/javascript

import { Rule } from 'eslint';
import * as regexpp from 'regexpp';
import * as regexpp from '@eslint-community/regexpp';
import { createRegExpRule, RegexRuleContext } from '../helpers/regex';

export const rule: Rule.RuleModule = createRegExpRule(context => {
Expand Down
2 changes: 1 addition & 1 deletion packages/jsts/src/rules/S6035/rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
// https://sonarsource.github.io/rspec/#/rspec/S6035/javascript

import { Rule } from 'eslint';
import { AST } from 'regexpp';
import { AST } from '@eslint-community/regexpp';
import { Alternation } from '../helpers/regex';
import { createRegExpRule } from '../helpers/regex';

Expand Down
2 changes: 1 addition & 1 deletion packages/jsts/src/rules/S6323/rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import { Rule } from 'eslint';
import { last } from '../helpers';
import { Alternation } from '../helpers/regex';
import * as regexpp from 'regexpp';
import * as regexpp from '@eslint-community/regexpp';
import { createRegExpRule } from '../helpers/regex';

export const rule: Rule.RuleModule = createRegExpRule(context => {
Expand Down
2 changes: 1 addition & 1 deletion packages/jsts/src/rules/S6324/rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
// https://sonarsource.github.io/rspec/#/rspec/S6324/javascript

import { Rule } from 'eslint';
import { Character } from 'regexpp/ast';
import { Character } from '@eslint-community/regexpp/ast';
import { createRegExpRule } from '../helpers/regex';

const EXCEPTIONS = ['\t', '\n'];
Expand Down
2 changes: 1 addition & 1 deletion packages/jsts/src/rules/S6326/rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
// https://sonarsource.github.io/rspec/#/rspec/S6326/javascript

import { Rule } from 'eslint';
import * as regexpp from 'regexpp';
import * as regexpp from '@eslint-community/regexpp';
import { createRegExpRule } from '../helpers/regex';

export const rule: Rule.RuleModule = createRegExpRule(context => {
Expand Down
4 changes: 2 additions & 2 deletions packages/jsts/src/rules/S6328/rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@

import { Rule } from 'eslint';
import * as estree from 'estree';
import * as regexpp from 'regexpp';
import { RegExpLiteral } from 'regexpp/ast';
import * as regexpp from '@eslint-community/regexpp';
import { RegExpLiteral } from '@eslint-community/regexpp/ast';
import { isRequiredParserServices } from '../helpers';
import {
GroupReference,
Expand Down
2 changes: 1 addition & 1 deletion packages/jsts/src/rules/S6331/rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
// https://sonarsource.github.io/rspec/#/rspec/S6331/javascript

import { Rule } from 'eslint';
import { AST } from 'regexpp';
import { AST } from '@eslint-community/regexpp';
import { createRegExpRule } from '../helpers/regex';

export const rule: Rule.RuleModule = createRegExpRule(context => {
Expand Down
2 changes: 1 addition & 1 deletion packages/jsts/src/rules/S6353/rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
// https://sonarsource.github.io/rspec/#/rspec/S6353/javascript

import { Rule } from 'eslint';
import { CharacterClass, Flags, Quantifier, RegExpLiteral } from 'regexpp/ast';
import { CharacterClass, Flags, Quantifier, RegExpLiteral } from '@eslint-community/regexpp/ast';
import { createRegExpRule, RegexRuleContext } from '../helpers/regex';

export const rule: Rule.RuleModule = createRegExpRule(context => {
Expand Down
2 changes: 1 addition & 1 deletion packages/jsts/src/rules/S6397/rule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
// https://sonarsource.github.io/rspec/#/rspec/S6397/javascript

import { Rule } from 'eslint';
import { CharacterClass, CharacterClassElement } from 'regexpp/ast';
import { CharacterClass, CharacterClassElement } from '@eslint-community/regexpp/ast';
import { createRegExpRule } from '../helpers/regex';

const FORBIDDEN_TYPES = [
Expand Down
2 changes: 1 addition & 1 deletion packages/jsts/src/rules/helpers/regex/alternation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import { CapturingGroup, Group, LookaroundAssertion, Pattern } from 'regexpp/ast';
import { CapturingGroup, Group, LookaroundAssertion, Pattern } from '@eslint-community/regexpp/ast';

/**
* An alternation is a regexpp node that has an `alternatives` field.
Expand Down
2 changes: 1 addition & 1 deletion packages/jsts/src/rules/helpers/regex/extract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as estree from 'estree';
import * as regexpp from 'regexpp';
import * as regexpp from '@eslint-community/regexpp';
import { Rule } from 'eslint';
import {
getSimpleRawStringValue,
Expand Down
2 changes: 1 addition & 1 deletion packages/jsts/src/rules/helpers/regex/location.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/
import { AST, Rule } from 'eslint';
import * as estree from 'estree';
import * as regexpp from 'regexpp';
import * as regexpp from '@eslint-community/regexpp';
import { isRegexLiteral, isStringLiteral } from '../';
import { getRegexpRange } from './range';

Expand Down
2 changes: 1 addition & 1 deletion packages/jsts/src/rules/helpers/regex/range.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/
import { AST } from 'eslint';
import * as estree from 'estree';
import * as regexpp from 'regexpp';
import * as regexpp from '@eslint-community/regexpp';
import { last, isRegexLiteral, isStringLiteral } from '../';
import { tokenizeString } from './tokenizer';

Expand Down
4 changes: 2 additions & 2 deletions packages/jsts/src/rules/helpers/regex/rule-template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
*/
import { Rule } from 'eslint';
import * as estree from 'estree';
import * as regexpp from 'regexpp';
import type { RegExpVisitor } from 'regexpp/visitor';
import * as regexpp from '@eslint-community/regexpp';
import type { RegExpVisitor } from '@eslint-community/regexpp/visitor';
import { isStringRegexMethodCall } from './ast';
import { getParsedRegex } from './extract';
import { getRegexpLocation } from './location';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import {
CharacterSet,
Flags,
Node,
} from 'regexpp/ast';
import * as regexpp from 'regexpp';
} from '@eslint-community/regexpp/ast';
import * as regexpp from '@eslint-community/regexpp';
import createTree from 'functional-red-black-tree';

const MAX_CODE_POINT = 0x10ffff;
Expand Down
2 changes: 1 addition & 1 deletion packages/jsts/tests/rules/helpers/regex/range.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import * as esprima from 'esprima';
import * as estree from 'estree';
import { getRegexpLocation, getRegexpRange } from '../../../../src/rules/helpers/regex';
import * as regexpp from 'regexpp';
import * as regexpp from '@eslint-community/regexpp';
import { Rule, SourceCode } from 'eslint';
import RuleContext = Rule.RuleContext;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import { Rule } from 'eslint';
import { AST } from 'regexpp';
import { AST } from '@eslint-community/regexpp';
import { createRegExpRule } from '../../../../src/rules/helpers/regex';
import { JavaScriptRuleTester } from '../../../tools';

Expand Down