-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcraco.config.js
52 lines (51 loc) · 1.2 KB
/
craco.config.js
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
const CracoLessPlugin = require('craco-less');
const rawLoader = require('craco-raw-loader');
module.exports = {
eslint: {
configure: {
overrides: [
{
files: ['**/*.ts', '**/*.tsx'],
rules: {
// @typescript-eslint rules
'@typescript-eslint/no-useless-constructor': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-angle-bracket-type-assertion': 'off',
'import/no-webpack-loader-syntax': 'off',
},
},
],
rules: {
'no-restricted-globals': [0, 'self'],
'no-new-func': 'off',
'jsx-a11y/alt-text': 'off',
'no-empty-pattern': 'off',
'no-loop-func': 'off',
'array-callback-return': 'off',
},
},
},
babel: {
plugins: [
[
'@babel/plugin-transform-typescript',
{
allowNamespaces: true,
},
],
],
},
plugins: [
{
plugin: CracoLessPlugin,
options: {
lessLoaderOptions: {
lessOptions: {
javascriptEnabled: true,
},
},
},
},
{ plugin: rawLoader, options: { test: /\.(md|txt)$/ } },
],
};