Skip to content

Commit 7feefff

Browse files
committed
chore: fix lint issues
1 parent 2aa2061 commit 7feefff

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+1030
-855
lines changed

packages/ts-syntax-highlighter/src/grammars/bash.ts

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -5,47 +5,47 @@ export const bashGrammar: Grammar = {
55
scopeName: 'source.bash',
66
keywords: {
77
// Control flow
8-
'if': 'keyword.control.bash',
9-
'then': 'keyword.control.bash',
10-
'else': 'keyword.control.bash',
11-
'elif': 'keyword.control.bash',
12-
'fi': 'keyword.control.bash',
13-
'case': 'keyword.control.bash',
14-
'esac': 'keyword.control.bash',
15-
'for': 'keyword.control.bash',
16-
'while': 'keyword.control.bash',
17-
'until': 'keyword.control.bash',
18-
'do': 'keyword.control.bash',
19-
'done': 'keyword.control.bash',
20-
'in': 'keyword.control.bash',
21-
'select': 'keyword.control.bash',
8+
if: 'keyword.control.bash',
9+
then: 'keyword.control.bash',
10+
else: 'keyword.control.bash',
11+
elif: 'keyword.control.bash',
12+
fi: 'keyword.control.bash',
13+
case: 'keyword.control.bash',
14+
esac: 'keyword.control.bash',
15+
for: 'keyword.control.bash',
16+
while: 'keyword.control.bash',
17+
until: 'keyword.control.bash',
18+
do: 'keyword.control.bash',
19+
done: 'keyword.control.bash',
20+
in: 'keyword.control.bash',
21+
select: 'keyword.control.bash',
2222
// Keywords
23-
'function': 'storage.type.function.bash',
24-
'declare': 'storage.type.bash',
25-
'local': 'storage.type.bash',
26-
'export': 'storage.type.bash',
27-
'readonly': 'storage.type.bash',
28-
'typeset': 'storage.type.bash',
23+
function: 'storage.type.function.bash',
24+
declare: 'storage.type.bash',
25+
local: 'storage.type.bash',
26+
export: 'storage.type.bash',
27+
readonly: 'storage.type.bash',
28+
typeset: 'storage.type.bash',
2929
// Built-in commands
30-
'echo': 'support.function.builtin.bash',
31-
'printf': 'support.function.builtin.bash',
32-
'read': 'support.function.builtin.bash',
33-
'cd': 'support.function.builtin.bash',
34-
'pwd': 'support.function.builtin.bash',
35-
'exit': 'support.function.builtin.bash',
36-
'return': 'support.function.builtin.bash',
37-
'source': 'support.function.builtin.bash',
38-
'test': 'support.function.builtin.bash',
39-
'eval': 'support.function.builtin.bash',
40-
'exec': 'support.function.builtin.bash',
41-
'shift': 'support.function.builtin.bash',
42-
'set': 'support.function.builtin.bash',
43-
'unset': 'support.function.builtin.bash',
44-
'alias': 'support.function.builtin.bash',
45-
'unalias': 'support.function.builtin.bash',
30+
echo: 'support.function.builtin.bash',
31+
printf: 'support.function.builtin.bash',
32+
read: 'support.function.builtin.bash',
33+
cd: 'support.function.builtin.bash',
34+
pwd: 'support.function.builtin.bash',
35+
exit: 'support.function.builtin.bash',
36+
return: 'support.function.builtin.bash',
37+
source: 'support.function.builtin.bash',
38+
test: 'support.function.builtin.bash',
39+
eval: 'support.function.builtin.bash',
40+
exec: 'support.function.builtin.bash',
41+
shift: 'support.function.builtin.bash',
42+
set: 'support.function.builtin.bash',
43+
unset: 'support.function.builtin.bash',
44+
alias: 'support.function.builtin.bash',
45+
unalias: 'support.function.builtin.bash',
4646
// Constants
47-
'true': 'constant.language.bash',
48-
'false': 'constant.language.bash',
47+
true: 'constant.language.bash',
48+
false: 'constant.language.bash',
4949
},
5050
patterns: [
5151
{ include: '#strings' },
@@ -91,8 +91,8 @@ export const bashGrammar: Grammar = {
9191
},
9292
{
9393
name: 'string.quoted.single.bash',
94-
begin: "'",
95-
end: "'",
94+
begin: '\'',
95+
end: '\'',
9696
},
9797
{
9898
name: 'string.unquoted.heredoc.bash',

packages/ts-syntax-highlighter/src/grammars/bnf.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ export const bnfGrammar: Grammar = {
88
repository: {
99
rules: { patterns: [{ name: 'keyword.operator.bnf', match: '::=' }] },
1010
nonterminals: { patterns: [{ name: 'entity.name.type.bnf', match: '<[^>]+>' }] },
11-
terminals: { patterns: [{ name: 'string.quoted.double.bnf', begin: '"', end: '"' }, { name: 'string.quoted.single.bnf', begin: "'", end: "'" }] },
11+
terminals: { patterns: [{ name: 'string.quoted.double.bnf', begin: '"', end: '"' }, { name: 'string.quoted.single.bnf', begin: '\'', end: '\'' }] },
1212
},
1313
}

packages/ts-syntax-highlighter/src/grammars/c.ts

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -5,47 +5,47 @@ export const cGrammar: Grammar = {
55
scopeName: 'source.c',
66
keywords: {
77
// Control flow
8-
'if': 'keyword.control.c',
9-
'else': 'keyword.control.c',
10-
'for': 'keyword.control.c',
11-
'while': 'keyword.control.c',
12-
'do': 'keyword.control.c',
13-
'switch': 'keyword.control.c',
14-
'case': 'keyword.control.c',
15-
'default': 'keyword.control.c',
16-
'break': 'keyword.control.c',
17-
'continue': 'keyword.control.c',
18-
'return': 'keyword.control.c',
19-
'goto': 'keyword.control.c',
8+
if: 'keyword.control.c',
9+
else: 'keyword.control.c',
10+
for: 'keyword.control.c',
11+
while: 'keyword.control.c',
12+
do: 'keyword.control.c',
13+
switch: 'keyword.control.c',
14+
case: 'keyword.control.c',
15+
default: 'keyword.control.c',
16+
break: 'keyword.control.c',
17+
continue: 'keyword.control.c',
18+
return: 'keyword.control.c',
19+
goto: 'keyword.control.c',
2020
// Types
21-
'void': 'storage.type.c',
22-
'char': 'storage.type.c',
23-
'short': 'storage.type.c',
24-
'int': 'storage.type.c',
25-
'long': 'storage.type.c',
26-
'float': 'storage.type.c',
27-
'double': 'storage.type.c',
28-
'signed': 'storage.type.c',
29-
'unsigned': 'storage.type.c',
30-
'struct': 'storage.type.c',
31-
'union': 'storage.type.c',
32-
'enum': 'storage.type.c',
33-
'typedef': 'storage.type.c',
21+
void: 'storage.type.c',
22+
char: 'storage.type.c',
23+
short: 'storage.type.c',
24+
int: 'storage.type.c',
25+
long: 'storage.type.c',
26+
float: 'storage.type.c',
27+
double: 'storage.type.c',
28+
signed: 'storage.type.c',
29+
unsigned: 'storage.type.c',
30+
struct: 'storage.type.c',
31+
union: 'storage.type.c',
32+
enum: 'storage.type.c',
33+
typedef: 'storage.type.c',
3434
// Modifiers
35-
'const': 'storage.modifier.c',
36-
'static': 'storage.modifier.c',
37-
'extern': 'storage.modifier.c',
38-
'register': 'storage.modifier.c',
39-
'volatile': 'storage.modifier.c',
40-
'inline': 'storage.modifier.c',
41-
'restrict': 'storage.modifier.c',
42-
'_Atomic': 'storage.modifier.c',
35+
const: 'storage.modifier.c',
36+
static: 'storage.modifier.c',
37+
extern: 'storage.modifier.c',
38+
register: 'storage.modifier.c',
39+
volatile: 'storage.modifier.c',
40+
inline: 'storage.modifier.c',
41+
restrict: 'storage.modifier.c',
42+
_Atomic: 'storage.modifier.c',
4343
// Operators
44-
'sizeof': 'keyword.operator.sizeof.c',
44+
sizeof: 'keyword.operator.sizeof.c',
4545
// Standard library types
46-
'size_t': 'support.type.c',
47-
'FILE': 'support.type.c',
48-
'NULL': 'constant.language.c',
46+
size_t: 'support.type.c',
47+
FILE: 'support.type.c',
48+
NULL: 'constant.language.c',
4949
},
5050
patterns: [
5151
{ include: '#preprocessor' },
@@ -63,22 +63,22 @@ export const cGrammar: Grammar = {
6363
name: 'meta.preprocessor.include.c',
6464
match: '^\\s*#\\s*include\\s+(<[^>]+>|"[^"]+")',
6565
captures: {
66-
'1': { name: 'string.quoted.other.lt-gt.include.c' },
66+
1: { name: 'string.quoted.other.lt-gt.include.c' },
6767
},
6868
},
6969
{
7070
name: 'meta.preprocessor.macro.c',
7171
match: '^\\s*#\\s*(define|undef)\\s+([a-zA-Z_][a-zA-Z0-9_]*)',
7272
captures: {
73-
'1': { name: 'keyword.control.directive.c' },
74-
'2': { name: 'entity.name.function.preprocessor.c' },
73+
1: { name: 'keyword.control.directive.c' },
74+
2: { name: 'entity.name.function.preprocessor.c' },
7575
},
7676
},
7777
{
7878
name: 'meta.preprocessor.c',
7979
match: '^\\s*#\\s*(if|ifdef|ifndef|elif|else|endif|pragma|error|warning|line)\\b',
8080
captures: {
81-
'1': { name: 'keyword.control.directive.c' },
81+
1: { name: 'keyword.control.directive.c' },
8282
},
8383
},
8484
],
@@ -111,8 +111,8 @@ export const cGrammar: Grammar = {
111111
},
112112
{
113113
name: 'string.quoted.single.c',
114-
begin: "'",
115-
end: "'",
114+
begin: '\'',
115+
end: '\'',
116116
patterns: [
117117
{
118118
name: 'constant.character.escape.c',

packages/ts-syntax-highlighter/src/grammars/cmd.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,17 @@ export const cmdGrammar: Grammar = {
44
name: 'Batch',
55
scopeName: 'source.cmd',
66
keywords: {
7-
'if': 'keyword.control.cmd', 'else': 'keyword.control.cmd', 'for': 'keyword.control.cmd', 'do': 'keyword.control.cmd',
8-
'goto': 'keyword.control.cmd', 'call': 'keyword.control.cmd', 'exit': 'keyword.control.cmd', 'echo': 'support.function.cmd',
9-
'set': 'support.function.cmd', 'setlocal': 'support.function.cmd', 'endlocal': 'support.function.cmd',
7+
if: 'keyword.control.cmd',
8+
else: 'keyword.control.cmd',
9+
for: 'keyword.control.cmd',
10+
do: 'keyword.control.cmd',
11+
goto: 'keyword.control.cmd',
12+
call: 'keyword.control.cmd',
13+
exit: 'keyword.control.cmd',
14+
echo: 'support.function.cmd',
15+
set: 'support.function.cmd',
16+
setlocal: 'support.function.cmd',
17+
endlocal: 'support.function.cmd',
1018
},
1119
patterns: [{ include: '#comments' }, { include: '#variables' }, { include: '#labels' }, { include: '#keywords' }],
1220
repository: {

0 commit comments

Comments
 (0)