-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Lint es-design-system and es-vue-base
- Loading branch information
1 parent
3efe35e
commit 88e90fb
Showing
15 changed files
with
4,450 additions
and
716 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
module.exports = { | ||
settings: { | ||
'import/resolver': { | ||
webpack: { | ||
config: { | ||
resolve: { | ||
extensions: ['*', '.js', '.vue', '.json'], | ||
alias: { | ||
'~': __dirname, | ||
'@': __dirname, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
extends: [ | ||
'eslint-config-energysage', | ||
], | ||
// Using one eslint file and overrides definition to handle sub directories | ||
// https://eslint.org/docs/user-guide/configuring/configuration-files#how-do-overrides-work | ||
overrides: [ | ||
{ | ||
files: [ | ||
'**/icons/**', | ||
], | ||
// Disable max length to allow for long paths in svg components | ||
rules: { | ||
'max-len': 'off', | ||
}, | ||
}, | ||
// https://github.com/jest-community/eslint-plugin-jest#readme | ||
{ | ||
files: [ | ||
'**/jest**', | ||
'**/*spec.*', | ||
], | ||
env: { | ||
jest: true, | ||
}, | ||
extends: [ | ||
'plugin:jest/recommended', | ||
'plugin:jest/style', | ||
], | ||
plugins: ['jest'], | ||
globals: { | ||
// From jest.vue.config.js | ||
testid: 'readonly', | ||
axe: 'readonly', | ||
}, | ||
rules: { | ||
'jest/no-standalone-expect': [ | ||
'error', | ||
{ additionalTestBlockFunctions: ['test', 'each.test'] }, | ||
], | ||
}, | ||
|
||
}, | ||
], | ||
rules: { | ||
// Disable/Enable any custom rules for your project | ||
'import/no-extraneous-dependencies': [ | ||
'error', | ||
{ | ||
devDependencies: [ | ||
'**/*rollup*', | ||
'**/*jest*', | ||
'**/*spec*', | ||
], | ||
}, | ||
], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
const devPresets = ['@vue/babel-preset-app']; | ||
const buildPresets = [ | ||
[ | ||
'@babel/preset-env', | ||
// Config for @babel/preset-env | ||
{ | ||
// Example: Always transpile optional chaining/nullish coalescing | ||
// include: [ | ||
// /(optional-chaining|nullish-coalescing)/ | ||
// ], | ||
}, | ||
], | ||
[ | ||
'@babel/preset-env', | ||
// Config for @babel/preset-env | ||
{ | ||
// Example: Always transpile optional chaining/nullish coalescing | ||
// include: [ | ||
// /(optional-chaining|nullish-coalescing)/ | ||
// ], | ||
}, | ||
], | ||
]; | ||
module.exports = { | ||
presets: (process.env.NODE_ENV === 'development' ? devPresets : buildPresets), | ||
presets: (process.env.NODE_ENV === 'development' ? devPresets : buildPresets), | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.