Socket
Socket
Sign inDemoInstall

eslint-plugin-angular

Package Overview
Dependencies
0
Maintainers
1
Versions
74
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.3.1 to 1.4.0

8

package.json
{
"name": "eslint-plugin-angular",
"version": "1.3.1",
"version": "1.4.0",
"description": "ESLint rules for AngularJS projects",

@@ -30,4 +30,4 @@ "main": "index.js",

"gulp": "^3.9.1",
"gulp-eslint": "^2.0.0",
"gulp-istanbul": "^0.10.3",
"gulp-eslint": "^3.0.1",
"gulp-istanbul": "^1.0.0",
"gulp-mocha": "^2.2.0",

@@ -38,3 +38,3 @@ "istanbul": "^0.4.2",

"parse-comments": "^0.4.3",
"shelljs": "^0.6.0",
"shelljs": "^0.7.1",
"shelljs-nodecli": "^0.1.1"

@@ -41,0 +41,0 @@ },

@@ -9,2 +9,7 @@ /**

*
* The naming scheme is <componentName><typeSeparator><componentType>.js
*
* The *componentType* for all service types (service, factory, provider, value) is 'service'.
* Since 1.5.0 it is possible to configure custom mappings for the *componentType*: {typeSeparator: 'dot', componentTypeMappings: {factory: 'factory', provider: 'provider'}.
*
* @styleguideReference {johnpapa} `y120` Naming - Naming Guidelines

@@ -30,15 +35,19 @@ * @styleguideReference {johnpapa} `y121` Naming - Feature File Names

var componentTypeMappings = {
module: 'module',
controller: 'controller',
directive: 'directive',
filter: 'filter',
service: 'service',
factory: 'service',
provider: 'service',
value: 'service',
constant: 'constant',
component: 'component'
};
function createComponentTypeMappings(options) {
var componentTypeMappingOptions = options.componentTypeMappings || {};
return {
module: componentTypeMappingOptions.module || 'module',
controller: componentTypeMappingOptions.controller || 'controller',
directive: componentTypeMappingOptions.directive || 'directive',
filter: componentTypeMappingOptions.filter || 'filter',
service: componentTypeMappingOptions.service || 'service',
factory: componentTypeMappingOptions.factory || 'service',
provider: componentTypeMappingOptions.provider || 'service',
value: componentTypeMappingOptions.value || 'service',
constant: componentTypeMappingOptions.constant || 'constant',
component: componentTypeMappingOptions.component || 'component'
};
}
var filenameUtil = {

@@ -101,5 +110,5 @@ firstToUpper: function(value) {

var filename = path.basename(context.getFilename());
var componentTypeMappings = createComponentTypeMappings(options);
return {
CallExpression: function(node) {

@@ -106,0 +115,0 @@ if (utils.isAngularComponent(node) && utils.isMemberExpression(node.callee)) {

@@ -54,3 +54,3 @@ /*

if (node.key.name === 'restrict') {
if (node.value.raw.indexOf('C') < 0 && node.value.raw.indexOf('A') < 0) {
if (node.value.raw && node.value.raw.indexOf('C') < 0 && node.value.raw.indexOf('A') < 0) {
return;

@@ -57,0 +57,0 @@ }

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc