forked from learningequality/kolibri-design-system
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.mjs
More file actions
79 lines (78 loc) · 2.07 KB
/
Copy patheslint.config.mjs
File metadata and controls
79 lines (78 loc) · 2.07 KB
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
68
69
70
71
72
73
74
75
76
77
78
79
import kolibriConfig from 'kolibri-format/eslint.config.mjs';
export default [
...kolibriConfig,
// Docs and examples use Nuxt aliases (~, ~~) that can't be resolved
{
files: ['docs/**/*.vue', 'docs/**/*.js', 'examples/**/*.vue'],
rules: {
'import-x/no-unresolved': 'off',
},
},
// Docs pages don't need i18n
{
files: ['docs/**/*.vue'],
rules: {
// Vuetify's helper attributes use hyphens and they would
// not be recognized if auto-formatted to camel case
'vue/attribute-hyphenation': 'off',
// This rule conflicts with Nuxt page naming
'vue/no-reserved-component-names': 'off',
// This rule conflicts with Nuxt page naming
'kolibri/vue-filename-and-component-name-match': 'off',
// max-len rules are unhelpful for documentation
'max-len': 'off',
'vue/max-len': 'off',
// Docs pages are not translated
'vue/no-bare-strings-in-template': 'off',
},
},
{
files: ['examples/**/*.vue'],
rules: {
// Allow console.log in examples
'no-console': 'off',
// Examples are not translated
'vue/no-bare-strings-in-template': 'off',
},
},
// jest.conf files: allow ~~ alias and puppeteer globals
{
files: ['jest.conf/**/*.js', 'jest.conf/**/*.vue'],
languageOptions: {
globals: {
page: 'readonly',
browser: 'readonly',
context: 'readonly',
puppeteerConfig: 'readonly',
jestPuppeteer: 'readonly',
},
},
rules: {
'import-x/no-unresolved': 'off',
},
},
// Test components don't need i18n
{
files: ['lib/**/__tests__/**/*.vue'],
rules: {
'vue/no-bare-strings-in-template': 'off',
},
},
// Spec files use describe.visual which is a valid describe wrapper
// but not recognized by the jest plugin
{
files: ['**/*.spec.js'],
rules: {
'jest/require-top-level-describe': 'off',
},
},
// Visual spec files need the page global
{
files: ['**/visual.spec.js'],
languageOptions: {
globals: {
page: 'readonly',
},
},
},
];