@@ -4,23 +4,71 @@ module.exports = {
44 browser : true ,
55 node : true ,
66 } ,
7- extends : [ 'plugin:vue/recommended' ] ,
8- // required to lint *.vue files
9- plugins : [ 'vue' ] ,
10- // add your custom rules here
11- rules : {
12- 'vue/no-dupe-keys' : 'warn' ,
13- 'vue/no-unused-components' : 'warn' ,
14- 'vue/no-side-effects-in-computed-properties' : 'warn' ,
15- 'vue/return-in-computed-property' : 'warn' ,
16- 'vue/no-unused-vars' : 'warn' ,
17- 'vue/no-textarea-mustache' : 'warn' ,
18- 'vue/require-valid-default-prop' : 'warn' ,
19- 'vue/multi-word-component-names' : 'warn' ,
20- 'vue/no-mutating-props' : 'warn' ,
21- } ,
22- parserOptions : {
23- parser : 'babel-eslint' ,
24- } ,
25- globals : { } ,
7+ overrides : [
8+ // Vue files
9+ {
10+ files : [ 'vue/**/*.js' , 'vue/**/*.vue' ] ,
11+ extends : [ 'plugin:vue/recommended' ] ,
12+ plugins : [ 'vue' ] ,
13+ parserOptions : {
14+ parser : 'babel-eslint' ,
15+ } ,
16+ rules : {
17+ 'vue/no-dupe-keys' : 'warn' ,
18+ 'vue/no-unused-components' : 'warn' ,
19+ 'vue/no-side-effects-in-computed-properties' : 'warn' ,
20+ 'vue/return-in-computed-property' : 'warn' ,
21+ 'vue/no-unused-vars' : 'warn' ,
22+ 'vue/no-textarea-mustache' : 'warn' ,
23+ 'vue/require-valid-default-prop' : 'warn' ,
24+ 'vue/multi-word-component-names' : 'warn' ,
25+ 'vue/no-mutating-props' : 'warn' ,
26+ } ,
27+ } ,
28+ // React files
29+ {
30+ files : [ 'src/**/*.js' ] ,
31+ extends : [ 'plugin:@wordpress/eslint-plugin/recommended' ] ,
32+ parserOptions : {
33+ ecmaFeatures : {
34+ jsx : true ,
35+ } ,
36+ ecmaVersion : 'latest' ,
37+ sourceType : 'module' ,
38+ } ,
39+ rules : {
40+ 'linebreak-style' : [ 'error' , 'unix' ] ,
41+ 'array-bracket-spacing' : [
42+ 'warn' ,
43+ 'always' ,
44+ {
45+ arraysInArrays : false ,
46+ objectsInArrays : false ,
47+ } ,
48+ ] ,
49+ 'key-spacing' : [
50+ 'warn' ,
51+ {
52+ beforeColon : false ,
53+ afterColon : true ,
54+ } ,
55+ ] ,
56+ 'object-curly-spacing' : [
57+ 'warn' ,
58+ 'always' ,
59+ {
60+ arraysInObjects : true ,
61+ objectsInObjects : false ,
62+ } ,
63+ ] ,
64+ '@wordpress/i18n-text-domain' : [
65+ 'error' ,
66+ {
67+ allowedTextDomain : 'tweet-old-post' ,
68+ } ,
69+ ] ,
70+ '@wordpress/no-unsafe-wp-apis' : 0 ,
71+ } ,
72+ } ,
73+ ] ,
2674} ;
0 commit comments