Skip to content

Commit 7449374

Browse files
committed
lint
1 parent b3c02d6 commit 7449374

File tree

13 files changed

+20
-106
lines changed

13 files changed

+20
-106
lines changed

eslint.config.mjs

Lines changed: 8 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ export default [
4949
jsdoc,
5050
'no-only-tests': noOnlyTests,
5151
},
52-
5352
languageOptions: {
5453
ecmaVersion: 2020,
5554
globals: globals.browser,
@@ -58,67 +57,16 @@ export default [
5857
project: ['./tsconfig.eslint.json'],
5958
},
6059
},
61-
6260
rules: {
6361
'@typescript-eslint/adjacent-overload-signatures': 'error',
64-
65-
'@typescript-eslint/array-type': [
66-
'error',
67-
{
68-
default: 'array-simple',
69-
},
70-
],
71-
72-
// "@typescript-eslint/ban-types": ["error", {
73-
// types: {
74-
// Object: {
75-
// message: "Avoid using the `Object` type. Did you mean `object`?",
76-
// },
77-
78-
// Function: {
79-
// message: "Avoid using the `Function` type. Prefer a specific function type, like `() => void`.",
80-
// },
81-
82-
// Boolean: {
83-
// message: "Avoid using the `Boolean` type. Did you mean `boolean`?",
84-
// },
85-
86-
// Number: {
87-
// message: "Avoid using the `Number` type. Did you mean `number`?",
88-
// },
89-
90-
// String: {
91-
// message: "Avoid using the `String` type. Did you mean `string`?",
92-
// },
93-
94-
// Symbol: {
95-
// message: "Avoid using the `Symbol` type. Did you mean `symbol`?",
96-
// },
97-
// },
98-
// }],
99-
62+
'@typescript-eslint/array-type': ['error', { default: 'array-simple' }],
10063
'@typescript-eslint/consistent-type-assertions': 'error',
10164
'@typescript-eslint/consistent-type-definitions': 'error',
10265
'@typescript-eslint/consistent-type-exports': 'error',
103-
104-
'@typescript-eslint/consistent-type-imports': [
105-
'error',
106-
{
107-
disallowTypeAnnotations: false,
108-
},
109-
],
110-
66+
'@typescript-eslint/consistent-type-imports': ['error', { disallowTypeAnnotations: false }],
11167
'@typescript-eslint/dot-notation': 'error',
112-
113-
'@typescript-eslint/explicit-member-accessibility': [
114-
'error',
115-
{
116-
accessibility: 'explicit',
117-
},
118-
],
119-
68+
'@typescript-eslint/explicit-member-accessibility': ['error', { accessibility: 'explicit' }],
12069
'@typescript-eslint/indent': 'off',
121-
12270
'@typescript-eslint/member-delimiter-style': [
12371
'off',
12472
{
@@ -133,7 +81,6 @@ export default [
13381
},
13482
},
13583
],
136-
13784
'@typescript-eslint/member-ordering': 'error',
13885
'@typescript-eslint/no-empty-function': 'error',
13986
'@typescript-eslint/no-empty-interface': 'error',
@@ -150,7 +97,6 @@ export default [
15097
'@typescript-eslint/prefer-namespace-keyword': 'error',
15198
'@typescript-eslint/quotes': 'off',
15299
'@typescript-eslint/semi': ['off', null],
153-
154100
'@typescript-eslint/triple-slash-reference': [
155101
'error',
156102
{
@@ -159,21 +105,19 @@ export default [
159105
lib: 'always',
160106
},
161107
],
162-
163108
'@typescript-eslint/type-annotation-spacing': 'off',
164109
'@typescript-eslint/unified-signatures': 'error',
165110
'arrow-body-style': 'error',
166111
'arrow-parens': ['off', 'always'],
167112
'brace-style': ['off', 'off'],
168-
camelcase: 'error',
113+
camelcase: 'off',
169114
'comma-dangle': 'off',
170115
complexity: 'off',
171116
'constructor-super': 'error',
172117
curly: ['error', 'multi-line'],
173118
'eol-last': 'off',
174119
eqeqeq: ['error', 'smart'],
175120
'guard-for-in': 'error',
176-
177121
'id-blacklist': [
178122
'error',
179123
'any',
@@ -186,16 +130,8 @@ export default [
186130
'Undefined',
187131
'undefined',
188132
],
189-
190133
'id-match': 'error',
191-
192-
'import/no-extraneous-dependencies': [
193-
'error',
194-
{
195-
devDependencies: false,
196-
},
197-
],
198-
134+
'import/no-extraneous-dependencies': ['error', { devDependencies: false }],
199135
'import/order': 'error',
200136
'import/named': 'off',
201137
'jsdoc/check-alignment': 'error',
@@ -224,24 +160,10 @@ export default [
224160
'no-new-wrappers': 'error',
225161
'no-only-tests/no-only-tests': 'error',
226162
'no-redeclare': 'error',
227-
228-
'no-restricted-imports': [
229-
'error',
230-
{
231-
patterns: ['**/_modules'],
232-
},
233-
],
234-
163+
'no-restricted-imports': ['error', { patterns: ['**/_modules'] }],
235164
'no-return-await': 'error',
236165
'no-sequences': 'error',
237-
238-
'no-shadow': [
239-
'off',
240-
{
241-
hoist: 'all',
242-
},
243-
],
244-
166+
'no-shadow': ['off', { hoist: 'all' }],
245167
'no-sparse-arrays': 'error',
246168
'no-template-curly-in-string': 'error',
247169
'no-throw-literal': 'error',
@@ -260,15 +182,7 @@ export default [
260182
radix: 'error',
261183
'space-before-function-paren': 'off',
262184
'space-in-parens': ['off', 'never'],
263-
264-
'spaced-comment': [
265-
'error',
266-
'always',
267-
{
268-
markers: ['/'],
269-
},
270-
],
271-
185+
'spaced-comment': ['error', 'always', { markers: ['/'] }],
272186
'use-isnan': 'error',
273187
'valid-typeof': 'off',
274188
},

functions/oembed.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* eslint-disable camelcase */
1+
22
/// <reference path="../node_modules/@cloudflare/workers-types/index.d.ts" />
33

44
import { getProjectInfo } from './utils';

src/livecodes/UI/command-menu-actions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* eslint-disable camelcase */
1+
22
import type { Config, INinjaAction, TemplateName } from '../models';
33
import { appLanguages } from '../i18n/app-languages';
44
import { languageIsEnabled, languages, processorIsEnabled, processors } from '../languages';

src/livecodes/editor/codejar/codejar.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import { prismThemes } from './prism-themes';
2828

2929
declare const Prism: any;
3030
Prism.manual = true;
31-
// eslint-disable-next-line camelcase
31+
3232
Prism.plugins.autoloader.languages_path = prismBaseUrl;
3333

3434
export const createEditor = async (options: EditorOptions): Promise<CodeEditor> => {

src/livecodes/export/export-codepen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export const exportCodepen = (
2020
};
2121
},
2222
) => {
23-
/* eslint-disable camelcase */
23+
2424
const form = document.createElement('form') as HTMLFormElement;
2525
form.action = 'https://codepen.io/pen/define';
2626
form.method = 'POST';

src/livecodes/export/export-jsfiddle.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export const exportJsfiddle = (
2020
};
2121
},
2222
) => {
23-
/* eslint-disable camelcase */
23+
2424
const form = document.createElement('form') as HTMLFormElement;
2525
form.action = 'https://jsfiddle.net/api/post/library/pure/';
2626
form.method = 'POST';

src/livecodes/languages/cpp/lang-cpp-script.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ livecodes.cpp = {
2929
livecodes.cpp.output += s;
3030
},
3131
},
32-
// eslint-disable-next-line camelcase
32+
3333
unsigned_overflow: 'warn',
3434
});
3535
// eslint-disable-next-line no-console

src/livecodes/languages/rescript/lang-rescript-compiler-esm.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* eslint-disable camelcase */
1+
22
import type { CompilerFunction, Language } from '../../models';
33
import { getAbsoluteUrl, loadScript } from '../../utils';
44
import {

src/livecodes/languages/ruby/lang-ruby.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export const ruby: LanguageSpecs = {
2222
url: opalBaseUrl + 'opal.min.js',
2323
factory: () => {
2424
importScripts(opalBaseUrl + 'opal-parser.min.js');
25-
// eslint-disable-next-line camelcase
25+
2626
(self as any).Opal.config.unsupported_features_severity = 'ignore';
2727
(self as any).Opal.load('opal-parser');
2828
return async (code, { config }) => {

src/livecodes/languages/tailwindcss/processor-tailwindcss-compiler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* eslint-disable camelcase */
1+
22
/* eslint-disable no-bitwise */
33
import type { CompilerFunction, Config, Language } from '../../models';
44
import { compileInCompiler, replaceStyleImports } from '../../compiler';

0 commit comments

Comments
 (0)