Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add linting rules and lint project
- Loading branch information
Showing
5 changed files
with
271 additions
and
51 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 |
---|---|---|
@@ -1,9 +1,14 @@ | ||
{ | ||
"extends": "standard", | ||
"plugins": [ | ||
"jest" | ||
], | ||
"env": { | ||
"jest/globals": true | ||
} | ||
"extends": ["plugin:@typescript-eslint/recommended"], | ||
"plugins": ["@typescript-eslint"], | ||
"rules": { | ||
"@typescript-eslint/no-explicit-any": 0, | ||
"@typescript-eslint/explicit-function-return-type": 0 | ||
}, | ||
"parserOptions": { | ||
"parser": "@typescript-eslint/parser", | ||
"tsconfigRootDir": "./src", | ||
"ecmaVersion": 11, | ||
"sourceType": "module" | ||
} | ||
} |
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
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,23 +1,26 @@ | ||
import { Configuration } from '@nuxt/types' | ||
import path from 'path' | ||
import { Configuration } from '@nuxt/types' | ||
|
||
export default async function nuxtTypedVuex (this: { | ||
options: Configuration | ||
addPlugin: (options: any) => void | ||
export default async function nuxtTypedVuex(this: { | ||
options: Configuration; | ||
addPlugin: (options: any) => void; | ||
}) { | ||
if (!this.options.store) console.warn('You do not have a Nuxt store defined.') | ||
if (!this.options.store) { | ||
console.warn('You do not have a Nuxt store defined.') | ||
} | ||
const { buildDir } = this.options | ||
const libDir = __dirname | ||
this.addPlugin({ | ||
src: path.resolve(__dirname, './plugin.js'), | ||
fileName: 'nuxt-typed-vuex.js', | ||
options: { | ||
libDir, | ||
buildDir | ||
} | ||
buildDir, | ||
}, | ||
}) | ||
} | ||
|
||
// eslint-disable-next-line | ||
export const meta = require('../package.json') | ||
|
||
export * from './utils' |
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.