1
0
mirror of https://github.com/sasjs/lint.git synced 2026-01-06 20:20:06 +00:00

Merge branch 'main' of https://github.com/sasjs/lint into main

This commit is contained in:
Krishna Acondy
2021-04-19 20:06:51 +01:00
5 changed files with 240 additions and 177 deletions

View File

@@ -2,6 +2,10 @@ import * as fileModule from '@sasjs/utils/file'
import { LintConfig } from '../types/LintConfig'
import { getLintConfig } from './getLintConfig'
const expectedFileLintRulesCount = 4
const expectedLineLintRulesCount = 5
const expectedPathLintRulesCount = 2
describe('getLintConfig', () => {
it('should get the lint config', async () => {
const config = await getLintConfig()
@@ -17,8 +21,8 @@ describe('getLintConfig', () => {
const config = await getLintConfig()
expect(config).toBeInstanceOf(LintConfig)
expect(config.fileLintRules.length).toEqual(3)
expect(config.lineLintRules.length).toEqual(5)
expect(config.pathLintRules.length).toEqual(2)
expect(config.fileLintRules.length).toEqual(expectedFileLintRulesCount)
expect(config.lineLintRules.length).toEqual(expectedLineLintRulesCount)
expect(config.pathLintRules.length).toEqual(expectedPathLintRulesCount)
})
})

View File

@@ -15,7 +15,7 @@ export const DefaultLintConfiguration = {
maxLineLength: 80,
noTabIndentation: true,
indentationMultiple: 2,
hasMacroNameInMend: false,
hasMacroNameInMend: true,
noNestedMacros: true,
hasMacroParentheses: true
}