-
Notifications
You must be signed in to change notification settings - Fork 23
/
task-configs.ts
67 lines (65 loc) · 2.12 KB
/
task-configs.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import { ESLintMigrationType, MigrationTaskConfig, TemplateLintMigrationType } from '../types';
export const ESLINT_MIGRATION_TASK_CONFIGS: {
[Key in ESLintMigrationType]: MigrationTaskConfig;
} = {
[ESLintMigrationType.NativeClasses]: {
fileMatchers: [
/app\/(app|router)\.js$/,
/(app|addon)\/(adapters|components|controllers|helpers|models|routes|services)\/.*\.js$/,
],
name: 'Native Classes',
rules: [
'ember/no-classic-classes',
'ember/classic-decorator-no-classic-methods',
'ember/no-actions-hash',
'ember/no-get',
],
},
[ESLintMigrationType.TaglessComponents]: {
fileMatchers: [/(app|addon)\/components\/.*\.js$/],
name: 'Tagless Components',
rules: ['ember/require-tagless-components'],
},
[ESLintMigrationType.GlimmerComponents]: {
fileMatchers: [/(app|addon)\/components\/.*\.js$/],
name: 'Glimmer Components',
rules: ['ember/no-classic-components'],
},
[ESLintMigrationType.TrackedProperties]: {
fileMatchers: [/(app|addon)\/components\/.*\.js$/],
name: 'Tracked Properties',
rules: ['ember/no-computed-properties-in-native-classes'],
},
[ESLintMigrationType.Mixins]: {
fileMatchers: [
/app\/(app|router)\.js$/,
/(app|addon)\/(adapters|components|controllers|helpers|models|routes|services)\/.*\.js$/,
],
name: 'No Mixins',
rules: ['ember/no-mixins'],
},
};
export const TEMPLATE_LINT_MIGRATION_TASK_CONFIGS: {
[Key in TemplateLintMigrationType]: MigrationTaskConfig;
} = {
[TemplateLintMigrationType.AngleBrackets]: {
fileMatchers: [/(addon|app)\/.*\.hbs$/],
name: 'Angle Brackets Syntax',
rules: ['no-curly-component-invocation'],
},
[TemplateLintMigrationType.NamedArgs]: {
fileMatchers: [/(addon|app)\/.*\.hbs$/],
name: 'Named Arguments',
rules: ['no-args-paths'],
},
[TemplateLintMigrationType.OwnProperties]: {
fileMatchers: [/(addon|app)\/.*\.hbs$/],
name: 'Own Properties',
rules: ['no-implicit-this'],
},
[TemplateLintMigrationType.UseModifiers]: {
fileMatchers: [/(addon|app)\/.*\.hbs$/],
name: 'Modifiers',
rules: ['no-action'],
},
};