Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
m-akinc committed Mar 2, 2024
1 parent 9f68e0a commit a96c515
Show file tree
Hide file tree
Showing 5 changed files with 92 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ jobs:
workingDir: ./packages/spright-components
externals: |
- '.storybook/public/**'
storybookBuildDir: ../../packages/site/dist/storybook
storybookBuildDir: ../../packages/site/dist/storybook-spright
exitOnceUploaded: true # Do not wait for test results
exitZeroOnChanges: true # Option to prevent the workflow from failing

Expand Down
5 changes: 4 additions & 1 deletion angular-workspace/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = {
message: 'Do not directly use underlying libraries of nimble. Instead rely on or add to exports of nimble packages.'
},
{
group: ['@ni/nimble-components/**/tests', '@ni/nimble-components/**/testing'],
group: ['@ni/nimble-components/**/tests', '@ni/nimble-components/**/testing', '@ni/spright-components/**/tests', '@ni/spright-components/**/testing'],
message: 'Do not use test code/utilities in production code.'
}]
}],
Expand Down Expand Up @@ -45,6 +45,9 @@ module.exports = {
}, {
group: ['@ni/nimble-components'],
message: 'Nimble Angular tests should not have to directly depend on nimble-components.'
}, {
group: ['@ni/spright-components'],
message: 'Spright Angular tests should not have to directly depend on spright-components.'
}]
}
]
Expand Down
71 changes: 69 additions & 2 deletions angular-workspace/projects/ni/spright-angular/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,81 @@
const path = require('path');

module.exports = {
extends: '../../../.eslintrc.js',
ignorePatterns: [
'!**/*',
'**/dist'
],
plugins: ['jsdoc'],
overrides: [
{
files: ['*.ts'],
files: [
'*.ts'
],
parserOptions: {
project: [
'./tsconfig.lib.json',
'./tsconfig.spec.json'
],
tsconfigRootDir: __dirname
tsconfigRootDir: __dirname,
createDefaultProgram: true
},
rules: {
// Require non-empty JSDoc comment on classes
'jsdoc/require-jsdoc': [
'error',
{
publicOnly: false,
require: {
ClassDeclaration: true,
FunctionDeclaration: false
}
}
],
'jsdoc/require-description': [
'error',
{ contexts: ['ClassDeclaration'] }
],
}
},
{
files: [
'*.js',
'*.ts'
],
rules: {
// Use package.json from angular-workspace root
'import/no-extraneous-dependencies': ['error', { packageDir: path.resolve(__dirname, '../../../') }],
// Nimble Angular Components follow web component naming conventions
// where the attribute and property names are different formats
'@angular-eslint/no-input-rename': 'off'
}
},
{
// Don't require class docs on modules (they're trivial) or tests (not public API)
files: [
'*.module.ts', '*.spec.ts'
],
rules: {
'jsdoc/require-jsdoc': 'off',
'jsdoc/require-description': 'off'
}
},
{
files: [
'*.html'
],
rules: {}
},
{
files: [
'build/**/*.js'
],
rules: {
// Logging in build scripts is useful
'no-console': 'off',
// Rollup config files use default exports
'import/no-default-export': 'off'
}
}
]
Expand Down
9 changes: 9 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions packages/spright-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@
"@babel/core": "^7.20.12",
"@ni/eslint-config-javascript": "^4.2.0",
"@ni/eslint-config-typescript": "^4.2.0",
"@ni/jasmine-parameterized": "^0.2.2",
"@rollup/plugin-commonjs": "^24.0.1",
"@rollup/plugin-json": "^6.0.0",
"@rollup/plugin-node-resolve": "^15.0.1",
"@rollup/plugin-replace": "^5.0.1",
"@rollup/plugin-terser": "^0.4.0",
"@storybook/addon-a11y": "^7.4.0",
"@storybook/addon-actions": "^7.4.0",
"@storybook/addon-docs": "^7.0.4",
Expand Down Expand Up @@ -104,6 +110,9 @@
"prettier-eslint": "^15.0.1",
"prettier-eslint-cli": "^7.1.0",
"remark-gfm": "^3.0.1",
"rollup": "^3.10.1",
"rollup-plugin-polyfill-node": "^0.12.0",
"rollup-plugin-sourcemaps": "^0.6.3",
"source-map-loader": "^4.0.0",
"storybook": "^7.4.0",
"ts-loader": "^9.2.5",
Expand Down

0 comments on commit a96c515

Please sign in to comment.